He did that with this:

domParser->setDoNamespaces(true);

Or is there more to it than that ???? 

-----Original Message-----
From: Gareth Reakes [mailto:[EMAIL PROTECTED] On
Behalf Of Gareth Reakes
Sent: Thursday, March 25, 2004 12:58 PM
To: [EMAIL PROTECTED]
Subject: Re: Question

Hi,
        you need to tell the parser that you want to use namespaces.
Take a look in the docs or samples.

Gareth


On Thu, 25 Mar 2004, Rajesh Chilambi wrote:

> Hi,
>   I have the following code
>
>       xercesc::XMLPlatformUtils::Initialize();
>     xercesc::MemBufInputSource* memBufIS = new
xercesc::MemBufInputSource
>     (
>         (const XMLByte*)gXMLInMemBuf
>         , strlen(gXMLInMemBuf)
>         , gMemBufId
>         , false
>     );
>
>       xercesc::XercesDOMParser* domParser = new
xercesc::XercesDOMParser();
>       domParser->parse(*memBufIS);
>       xercesc::DOMDocument* doc = domParser->getDocument();
>       domParser->setDoNamespaces(true);
>       xercesc::DOMNode* ele =
(xercesc::DOMNode*)doc->getDocumentElement();
>       wchar_t* p = (wchar_t*)ele->getLocalName();
>       wchar_t* p1 = (wchar_t*)ele->getPrefix();
>       wchar_t* p2 = (wchar_t*)ele->getNodeName();
>       wchar_t* p3 = (wchar_t*)ele->getNamespaceURI();
>
> The DOMNode in question is like this <soap:envelope> ... 
> </soap:envelope> getLocalName, getprefix and getnamespaceuri all
return empty strings.  Only getNodeName returns me "soap:envelope".  If
someone can tell me why getLocalname, getprefix and getnamespaceuri
don't return me correct values, i would appreciate it.
>
> Thanx in advance
> Rajesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-- 
Gareth Reakes, Managing Director            +44-1865-811184
Parthenon Computing                http://www.parthcomp.com




---------------------------------------------------------------------
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]

Reply via email to