QString test_str="89898";
std::string test_char = test_str.toStdString();
std::cout<<"@@@@@@@@@@1111111@@@@@@@ test_char"<
InputSource* test_pInputSource = new MemBufInputSource((const XMLByte *)test_char.c_str(), test_char.size(), "root",false);
//InputSource* test_pInputSource = new MemBufInputSource((XMLByte *)test_char.c_str(), test_char.size(), (const XMLCh*)0);
std::cout
m_pParser->parse(*test_pInputSource);
DOMDocument* test_iedDoc = m_pParser->getDocument();
std::cout<<"@@@@@@@@@@0000001@@@@@@@ "<
DOMElement* test_curIEDEle = NULL;
test_curIEDEle = test_iedDoc->getDocumentElement();
std::cout<<"@@@@@@@@@@0000001.5@@@@@@@ "<<std::endl;
XMLCh *test_name = XMLString::transcode("name");
std::cout<<"@@@@@@@@@@0000001.555@@@@@@@ test_name="<<test_name<<std::endl;
const XMLCh* test_nameVal = test_curIEDEle->getAttribute(test_name);
std::cout<<"@@@@@@@@@@0000002@@@@@@@ "<<std::endl;
char * test_nameValStr= XMLString::transcode(test_nameVal);
std::cout<<"@@@@@@@@@@222222@@@@@@@ nameValStr="<<test_nameValStr<<std::endl;
XMLString::release(&test_nameValStr);
std::cout<<"@@@@@@@@@@0000003@@@@@@@ "<<std::endl;
std::getchar();
解析时,当出现中文时,就输出不来,英文就是可以,在windows和Ubuntu能够正常运行,但是在solaris系统下不能够正常解析,跪求各位大神呀