String (with spaces) to DOM in Java

bluedevil

New Member
I have a function which converts a string to DOM, and then uses javax.xml.xpath.XPathFactory on the DOM object to pull data.The XPathFactory works fine for the following string \[code\]<root><test><name>A</name></test><test><name>B</name></test></root>\[/code\]but it fails if I have spaces between tags\[code\]<root> <test> <name>A</name> </test> <test> <name>B</name> </test></root>\[/code\]I'm using XpathFactory to ready the values "A" and "B" from the DOM.Can anyone tell me exactly why is XpathFactory failing when the string has spaces in between tags.Thanks
--SD
 
Back
Top