Ok, I correct myself, all works OK using the method setDoNamespaces(true)
Thanks
Nacho
Nacho Conde escribió:
David Bertoni escribió:
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.
I am using the XercesDOMParser class, initialized with the method
"setDoNamespaces(true)", the method getDoNamespaces (for confirm) give
me a true in response.
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.
Yes this is true, using parseXMLStream all works ok.
Dave
Nacho
__________ NOD32 2112 (20070313) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com