J
Jason Cavett
Before I get flamed, I have already read on how to ignore whitespace
in an XML document via the Java DOM. However, according to the
following link, it currently is not working as intended. (See:
http://forums.java.net/jive/thread.jspa?messageID=226957 for the
thread and http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6564400
for the bug report)
So, I can't seem to use DocumentBuilderFactory's
setIgnoringElementContentWhitespace, so I am wondering if there is
another way to handle whitespace in an XML file. When I parse the XML
file and get the children the text nodes look something like this...
name: #text
data: (all whitespace - spaces, \n, etc.)
Now, I suppose I could just check to see if the name is #text and
ignore it as I loop through the nodes, but that seems kind of crummy
to do that. Is there a better way that I'm not seeing?
Thanks
in an XML document via the Java DOM. However, according to the
following link, it currently is not working as intended. (See:
http://forums.java.net/jive/thread.jspa?messageID=226957 for the
thread and http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6564400
for the bug report)
So, I can't seem to use DocumentBuilderFactory's
setIgnoringElementContentWhitespace, so I am wondering if there is
another way to handle whitespace in an XML file. When I parse the XML
file and get the children the text nodes look something like this...
name: #text
data: (all whitespace - spaces, \n, etc.)
Now, I suppose I could just check to see if the name is #text and
ignore it as I loop through the nodes, but that seems kind of crummy
to do that. Is there a better way that I'm not seeing?
Thanks