java - XmlPullParser to string -
i getting xml web, , this
xmlpullparser receiveddata = xmlpullparserfactory.newinstance().newpullparser(); receiveddata.setinput(xmlurl.openstream(), null); and want set receiveddata readable string can check if xml on web same downloading.
i tried receiveddata.tostring() gives, org.kxml2.io.kxmlparser@27fd33b24
how can readable string?
thanks
the tostring() method returning java object reference java.lang.object's tostring method does. method not overriden xmlpullparser class.
i not sure how working xmlpullparser object works, seems event-oriented xml parser. may add logs display events while parsing xml using gettext method on node.
the server's content may intercepted before instantiate xmlpullparser object; don't know exact implementation of inputstream receiving "xmlurl.openstream()" can try stringify ioutils classes this:
string thestring = ioutils.tostring(inputstream, encoding); see this post
Comments
Post a Comment