Nacho Conde wrote:
Hi,
I have a code, that convert a DomDocument to a XalanDocument, with the
method createDocument() of XercesParserLiaison and i have the object
XercesDOMSupport initialized.
XercesParserLiaison theParser;
XercesDOMSupport theXercesDomSupport;
theXercesDomSupport()
theParser (theXercesDomSupport)
i parse the DomDocument using this form,
theDocument=theParser.createDocument(&doc);
Then i try to evaluate some xpath expressions and.. if i find nodes
without namespaces, the query is OK however, if i use a query with
namespace to find a node with namespace the result of the query is empty.
Perhaps you aren't building the DOM with namespaces enabled? Using a DOM
that was not built with namespaces enabled will result in undefined behavior.
The document is ok, if i write the DomDocument to string and then parse
this string with xpath, all works ok..
If by "parse this string with xpath" you mean you use
XercesParserLiaison.parseXMLStream(), then it works because we enable
namespace processing for the DOM we build.
Dave