Hi,

I'm using Xerces -c 1.5
I have an access violation with this code , m_answer contains a well formed
xml string encoded in 8859-1, and an error occurs when I try to transcode
the xml, because dp->parse(ip) doesn't work, Why? m_answer is an std:string
and I retrieve the xml string from a Servlet using Xerces J. The attribute
configStatus exists.

     DOMParser* dp = new DOMParser();
         dp->setDoNamespaces(true);
         dp->setDoSchema(false);
          dp->setValidationScheme(DOMParser::Val_Auto);
          dp->setToCreateXMLDeclTypeNode(true);
          dp->setCreateEntityReferenceNodes(false);

               MemBufInputSource ip
    (
        (const XMLByte*)m_answer.c_str()
        , strlen(m_answer.c_str())
        , "configType"
        , false
    );
     dp->parse(ip);
     DOM_Document document = dp->getDocument();
     //construction de configType
     DOM_Element e = (DOM_Element &) document.getDocumentElement();
     std::string _buffer = std::string(e.getAttribute("configStatus").transcode());

Ciao
Christophe



___________________________________________________________

This message and any attachments (the "message") is intended solely for
the addressees and is confidential.  If you receive this message in error,
please delete it and immediately notify the sender.

Any use not in accord with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited except formal approval.

The internet can not guarantee the integrity of this message.  BNP PARIBAS
(and its subsidiaries) shall (will) not therefore be liable for the message
if modified.
                       --------------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le "message") sont
etablis a l'intention exclusive de ses destinataires et sint confidentiels.
Si vous recevez ce message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur.

Toute utilisation de ce message non conforme a sa destination, toute
diffusion ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse.

L'internet ne permettant pas d'assurer l'integrite de ce message, BNP
PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.
___________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to