Here is some example.xml: <Person> <Name> "Manoj"</Name> <class> "10th" </class> <Genre> "male"</Genre> ... </Person>
The name field contains ' " ' ("Manoj" as shown in the above example). When I was parsing it using the DOM parser as shown in the previous mail, I am getting only " instead of "Manoj". Not complete string I am getting. How to get the complete values ( even the node values contains ", & ... etc escape sequence characters). Can any one please help me. Thanks, Manoj. On Apr 2, 10:39 am, manoj <manojkumar.m...@gmail.com> wrote: > Hi I am writing an application which reads the xml data and just > prints it. > > The xml data consists of some escape sequence characters like &," ... > > I am using DOM parser for this. > > When trying to print the data, I am not able to get the original data. > > The code, I am using is: > > Document doc = null; > DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); > DocumentBuilder db = dbf.newDocumentBuilder(); > is = urlConn.getInputStream(); > doc = db.parse(is); > > org.w3c.dom.Element feed = > doc.getDocumentElement(); > > NodeList nl = feed.getElementsByTagName("videoItem"); > > Node el = (Node)nl.item(j); > > NodeList nl1 = ( > (org.w3c.dom.Element) el).getElementsByTagName > ("id"); > if(nl1 != null && nl1.getLength() > 0) > { > Node ele = (Node)nl1.item(0); > String idVal = ((Node) > ele).getFirstChild().getNodeValue(); > System.out.println("channel > id is->"+idVal); > videoItem.m_id = idVal; > > } > > How can I handle this issue? > > Thanks, > manoj. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---