The data that I get from the socket is of the format.. <XMl cersion.... > <Node1> <subnode1>abc</subnode1> <subnode2>abc</subnode2> <subnode3>abc</subnode3>
My question is I need some direction as to how I can convert the data that I have got to a XML document and use SAX praser to parse the data.. Please help..
posted 9 years ago
What you got is a String!
Q. How to parse an XML String? A: Easy! No matter you using DOM (javax.xml.parsers.DocumentBuilder) or SAX (org.xml.sax.XMLReader), or vendor specific SAXParser/DOMParser, you all can use the same signature method parse(InputSource input) to parse you XML. Now the question becomes how to use String to make an InputSource.