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

Cannot possible to append imported node

    XMLWordPrintableJSON

Details

    Description

      I have one node, that is imported from second document. When I try to append this node to first node, it throws an exception.

      DOMImplementation* pDOMImplementation = DOMImplementationRegistry::getDOMImplementation(XMLString::transcode( "CORE" ));

      pDOMParser = pDOMImplementation->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);

      if( pDOMParser->getDomConfig()->canSetParameter( XMLUni::fgDOMValidate, true ) )
      pDOMParser->getDomConfig()->setParameter( XMLUni::fgDOMValidate, true );
      if( pDOMParser->getDomConfig()->canSetParameter( XMLUni::fgDOMNamespaces, true ) )
      pDOMParser->getDomConfig()->setParameter( XMLUni::fgDOMNamespaces, true );
      if( pDOMParser->getDomConfig()->canSetParameter( XMLUni::fgDOMDatatypeNormalization, true ) )
      pDOMParser->getDomConfig()->setParameter( XMLUni::fgDOMDatatypeNormalization, true );

      pFirstDOMDocumnt = pDOMParser->parseURI(path);
      pSecondDOMDocumnt = pDOMParser->parseURI(path);

      ......

      try
      {
      DOMNode* pImportedNode =pSecondDOMDocumnt->importNode(pChild, true);
      pParent->appendChild(pChildElement);
      }
      catch(DOMException exe)
      {
      fprintf(stdout,"Exception : %S\n",exe.getMessage());
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            subinsjose subins jose
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: