Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Work around potentially buggy DOM implementation Node.getTextContent() #100
JDOM 2.x starts using getTextContent() to get the value of Text nodes when converting a DOM document to JDOM in the DocumentBuilder class.
There are potential issues in some DOM libraries, and it is not necessary to do that. To avoid potential bugs, use getNodeValue() instead (like JDOM 1.x did).
Since getNodeValue() comes from DOM1 and getTextContent() comes from DOM3 we should run in to fewer problems with getNodeValue().
See further discussion here: http://jdom.markmail.org/thread/zzg72amluw2gdiht