Hi All,
after all your post , My probleme is Solved
I send know all the Code :
XMLCh m_xmlChTempStr[LENGTH_TEMPORAL_STRING_3];
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* m_xmlDoc;
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* domdoc;
DOMBuilder* parser =
((DOMImplementationLS*)m_xmlImpl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS,
0);
const char* gXMLInMemBuf = m_strValue;
MemoryManager* Manager = XMLPlatformUtils::fgMemoryManager;
MemBufInputSource* memBufIS = new MemBufInputSource((const
XMLByte*)gXMLInMemBuf, strlen(gXMLInMemBuf), "test", false,Manager );
Wrapper4InputSource *InputSource= new Wrapper4InputSource
(memBufIS,false);
domdoc = parser->parse(*InputSource);
XMLCh tempStr[LENGTH_TEMPORAL_STRING];
CString strNomRuta = "RecCmd";
XMLString::transcode(strNomRuta, m_xmlChTempStr,
(LENGTH_TEMPORAL_STRING_3
- 1));
m_xmlDoc = m_xmlImpl->createDocument(0, m_xmlChTempStr, 0);
DOMElement* RecCmd = m_xmlDoc->getDocumentElement();
XMLString::transcode("version", m_xmlChTempStr,
(LENGTH_TEMPORAL_STRING_3 -
1));
XMLString::transcode(VERSIO_XML_REC_CMD, tempStr,
(LENGTH_TEMPORAL_STRING_3
- 1));
DOMAttr* attr = m_xmlDoc->createAttribute(m_xmlChTempStr);
attr->setValue(tempStr);
RecCmd->setAttributeNode(attr);
DOMNode* domnode = domdoc->getDocumentElement();
DOMNode* newRoot = m_xmlDoc->importNode(domnode, true);
DOMNodeList * ListNodes = newRoot->getChildNodes();
XMLSize_t NbrCount = ListNodes->getLength();
DOMNode* TheNode = NULL;
for(XMLSize_t i =0; i<NbrCount ;i++)
{
TheNode = ListNodes->item(0);
if(TheNode!=NULL)
{
m_xmlDoc->getDocumentElement()->appendChild(TheNode);
}
}
delete memBufIS;
delete InputSource;
delete parser;
Thanks For You
--
View this message in context:
http://www.nabble.com/Xerces-and-special-caractere-%3C-%3E-tp24201194p24273381.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.