Timo, Sounds like an issue with XPathAPI however this class doesn't come from Xerces. It's a Xalan specific API [1]. You should try this again with the latest Xalan release and if it isn't working as you'd expect try asking about it on the [email protected] mailing list.
Thanks. [1] http://xml.apache.org/xalan-j/apidocs/org/apache/xpath/XPathAPI.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] "Nentwig, Timo" <[EMAIL PROTECTED]> wrote on 11/22/2005 09:25:43 AM: > Hi! > > I'm experiencing some curiosity when parsing CDATA. I was not able to > figure out the exact cause but when indenting the cdata tag and/or > adding whitespaces, linefeeds Xerces 2.6.2 becomes unable to parse the > file properly, i.e. the selected Node is actually empty (not null): > > final DocumentBuilderFactory factory = > DocumentBuilderFactory.newInstance(); > final Document doc = builder.parse( > getClass().getResourceAsStream("file.xml" )); final Node n = > XPathAPI.selectSingleNode( doc, "/queries/[EMAIL PROTECTED]'foo']/text()" ); > System.out.println( n.getNodeValue() ); > > <queries> > <query id="foo"><![CDATA[ > SELECT > foo > FROM > bar > ]]></query> > </queries> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
