Hello, I am working on a project that needs very raw access to the XML stream. I have two questions:
for my send-to-xmpp-stream-console i need a way to push a String into the (out) stream. How to do this. If there is no other than creating a Packet from the string, how to parse the String into a Packet?
for my not private namespaces i need a way to generate and analyse Packets in a very felxible way. in detail: i want to generate and analyse all packet elements, their children (elements, text…) and parameters myself. How can I do this? how can I iterate through the xml?
You can use packet.toXML() method to construct a DOM Document if you want.
Ok, and how do I do this? If I want to create such a not by default supported packet myself, how can i push it in the stream (as dom, or how do i load it into a smach Iq packet)???
But what we usally do is to use an IQ provider and parse the information using XMLPullParser.
And how can i do this? how can i pull my information from the package (namespace not supported in smack)???
If I want to create such a not by default supported packet myself, how can i push it in the stream (as dom, or how do i load it into a smach Iq packet)???
You could simply create a new plugin and register it for that namespace.
As an example, you could look at my implementation of XEP-0085:
ChatStateNotifications.java
or XEP-0066:
OutOfBandDataExtension.java
And how can i do this? how can i pull my information from the package (namespace not supported in smack)???