[ 
https://issues.apache.org/jira/browse/XERCESC-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alberto Massari closed XERCESC-1965.
------------------------------------

    Resolution: Incomplete

Please use the c-us...@xerces.apache.org for asking help troubleshooting a 
problem. Bugs should be open only for confirmed problems in the Xerces library

> why importNode result in coredump on aix 5.3??
> ----------------------------------------------
>
>                 Key: XERCESC-1965
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1965
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>         Environment: AIX 5.3 32bit
> xerces c++ 3.1.1
>            Reporter: lin
>
> On AIX 5.3, using xerces c++ 3.1.1, I want to use importNode to import a Node 
> in doc2 to doc1, But when I run my program, it coredump with "Illegal 
> instrunction(coredump)";
> My program is:
>        XMLCh tempStr[100];
>         XMLString::transcode("LS", tempStr, 99);
>         DOMImplementation *impl = 
> DOMImplementationRegistry::getDOMImplementation(tempStr);
>         DOMLSParser* parser = 
> ((DOMImplementationLS*)impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS,
>  0);
>         DOMLSParser* parser2 = 
> ((DOMImplementationLS*)impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS,
>  0);
>         // optionally you can set some features on this builder
>         if (parser->getDomConfig()->canSetParameter(XMLUni::fgDOMValidate, 
> true))
>             parser->getDomConfig()->setParameter(XMLUni::fgDOMValidate, true);
>         if (parser->getDomConfig()->canSetParameter(XMLUni::fgDOMNamespaces, 
> true))
>             parser->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, 
> true);
>         if 
> (parser->getDomConfig()->canSetParameter(XMLUni::fgDOMDatatypeNormalization, 
> true))
>             
> parser->getDomConfig()->setParameter(XMLUni::fgDOMDatatypeNormalization, 
> true);
>         if 
> (parser->getDomConfig()->canSetParameter(XMLUni::fgDOMElementContentWhitespace
>    , false))
>             
> parser->getDomConfig()->setParameter(XMLUni::fgDOMElementContentWhitespace   
> , false);
>         char* xmlFile = "/home/easyeai/tmp/lll.xml";
>         char* xmlFile2 = "/home/easyeai/tmp/kk.xml";
>         DOMDocument *doc1 = 0;
>         DOMDocument *doc2 = 0;
>         try {
>             doc1 = parser->parseURI(xmlFile);
>             doc2 = parser2->parseURI(xmlFile2);
>          
>             DOMNodeList *list = 
> doc1->getElementsByTagName(XMLString::transcode("MSN")) ;
>             DOMNode *node = list->item(0);
>             doc2->importNode( node, true);
>         }
>         catch (const XMLException& toCatch) {
>             char* message = XMLString::transcode(toCatch.getMessage());
>             cout << "Exception message is: \n"
>                  << message << "\n";
>             XMLString::release(&message);
>             return -1;
>         }
>         catch (const DOMException& toCatch) {
>             char* message = XMLString::transcode(toCatch.msg);
>             cout << "Exception message is: \n"
>                  << message << "\n";
>             XMLString::release(&message);
>             return -1;
>         }
>         catch (...) {
>             cout << "Unexpected Exception \n" ;
>             return -1;
>         }
> It compiled OK, but when run to importNode , it  run into coredump with 
> message "Illegal instruction(coredump)"??
> WHY??
> Help me please

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to