How do I parse an XML, which is stored in a String? Assume the string name is xmlString. It contains 'employee' as root node and firstname, lasename, address as child node.
I tried the following with xml4J parser. 1. Create a parser object Parser p = new Parser("parser.err"); 2. converting a string into an inputstream. ByteArrayInputStream is = new ByteArrayInputStream(xmlString.getBytes());
3. Create the DOM tree TXDocument document = parser.readStream(is); here, document(DOM tree) is null. So, I am not able to get the root element. Why is that??? Thanks