posted 17 years ago
If an org.w3c.dom.Document contains CDATA sections, then there will be nodes in the tree of the type org.w3c.dom.CDATASection. Note also that Node has a method getNodeType(), which will return Node.CDATA_SECTION_NODE if the node is a CDATA section.
So you could walk through the tree of nodes, calling getNodeType() on each node and see if it is equal to Node.CDATA_SECTION_NODE.
Have a look at the API documentation of the interfaces and classes in package org.w3c.dom.
[ October 30, 2007: Message edited by: Jesper Young ]