Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1965

why importNode result in coredump on aix 5.3??

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • None
    • None
    • DOM
    • None
    • AIX 5.3 32bit

      xerces c++ 3.1.1

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            mill888 lin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: