You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "subins jose (JIRA)" <xe...@xml.apache.org> on 2012/11/26 09:24:57 UTC

[jira] [Created] (XERCESC-2005) Cannot possible to append imported node

subins jose created XERCESC-2005:
------------------------------------

             Summary: Cannot possible to append imported node
                 Key: XERCESC-2005
                 URL: https://issues.apache.org/jira/browse/XERCESC-2005
             Project: Xerces-C++
          Issue Type: Bug
          Components: DOM
    Affects Versions: 3.1.1
         Environment: Windows XP
            Reporter: subins jose
             Fix For: 3.1.1


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());
}




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Closed] (XERCESC-2005) Cannot possible to append imported node

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari closed XERCESC-2005.
------------------------------------

    Resolution: Invalid

Please don't open bugs to ask questions: use c-users@xerces.apache.org instead
                
> Cannot possible to append imported node
> ---------------------------------------
>
>                 Key: XERCESC-2005
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2005
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: 3.1.1
>         Environment: Windows XP
>            Reporter: subins jose
>              Labels: Exception, appendchild, importNode
>             Fix For: 3.1.1
>
>
> 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());
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Re: [jira] [Reopened] (XERCESC-2005) Cannot possible to append imported node

Posted by Ben Griffin <be...@redsnapper.net>.
Import the node first, then append it.




On 4 Dec 2012, at 05:09, "subins jose (JIRA)" <xe...@xml.apache.org> wrote:

> 
>     [ https://issues.apache.org/jira/browse/XERCESC-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> subins jose reopened XERCESC-2005:
> ----------------------------------
> 
> 
> Hi, 
> 
> It is not a question. It is a bug. I am using xerces 3.1.1. In this version I cannot possible to append a node from other document, that was imported. It throws the WRONG_DOCUMENT_ERR exception .
> 
> Thanks,
> 
>> Cannot possible to append imported node
>> ---------------------------------------
>> 
>>                Key: XERCESC-2005
>>                URL: https://issues.apache.org/jira/browse/XERCESC-2005
>>            Project: Xerces-C++
>>         Issue Type: Bug
>>         Components: DOM
>>   Affects Versions: 3.1.1
>>        Environment: Windows XP
>>           Reporter: subins jose
>>             Labels: Exception, appendchild, importNode
>>            Fix For: 3.1.1
>> 
>> 
>> 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());
>> }
> 
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 

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


[jira] [Reopened] (XERCESC-2005) Cannot possible to append imported node

Posted by "subins jose (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

subins jose reopened XERCESC-2005:
----------------------------------


Hi, 

It is not a question. It is a bug. I am using xerces 3.1.1. In this version I cannot possible to append a node from other document, that was imported. It throws the WRONG_DOCUMENT_ERR exception .

Thanks,
                
> Cannot possible to append imported node
> ---------------------------------------
>
>                 Key: XERCESC-2005
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2005
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: 3.1.1
>         Environment: Windows XP
>            Reporter: subins jose
>              Labels: Exception, appendchild, importNode
>             Fix For: 3.1.1
>
>
> 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());
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Closed] (XERCESC-2005) Cannot possible to append imported node

Posted by "subins jose (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

subins jose closed XERCESC-2005.
--------------------------------

    Resolution: Fixed

Sorry, It is not a bug,
                
> Cannot possible to append imported node
> ---------------------------------------
>
>                 Key: XERCESC-2005
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2005
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: 3.1.1
>         Environment: Windows XP
>            Reporter: subins jose
>              Labels: Exception, appendchild, importNode
>             Fix For: 3.1.1
>
>
> 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());
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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