You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Sauquet Dominique <ds...@prosodie.com> on 2002/10/01 09:19:31 UTC

RE: Problem with the method renameNode again

Unfortunately, there is no change.
I still get a Null Pointer Exception 
	Dominique

-----Message d'origine-----
De : sire chembiparambil [mailto:sire@us.ibm.com]
Envoyé : lundi 30 septembre 2002 16:27
À : xerces-j-user@xml.apache.org
Objet : Re: Problem with the method renameNode again




Try using the Node obj returned as a result of the rename() operation.

((org.apache.xerces.dom.DocumentImpl)doc).renameNode(tree, null, tagName);
System.out.println(" #### after renameNode");

change this to be like

tree = ((org.apache.xerces.dom.DocumentImpl)doc).renameNode(tree, null,
tagName);
System.out.println(" #### after renameNode");

I havent tried this out, just a thought.

Sire Chembiparambil




Sauquet Dominique <ds...@prosodie.com> on 09/30/2002 09:51:37 AM

Please respond to xerces-j-user@xml.apache.org

To:    xerces-j-user@xml.apache.org
cc:
Subject:    Problem with the method renameNode again



Hello

I resend a mail that I previously sent on last friday since
I am puzzled by the very few mails we have from this mailing
list that is generally so active.

The problem is :

I tried to use the method renameNode of the class
org.apache.xerces.dom.DocumentImpl
The node is effectively renamed but I generate an exception :
NullPointerException.

Please can you explain me what happens ?
is it a misuse ?
can I do otherwise ?

I attach a test file.
You can test it by launching java TestClass

 <<TestClass.class>>  <<TestClass.java>>

ps : I tried another method much more complex where a replaceChild is used
but does not work when I want to change the tag name of the root !!

Thanks a lot


> Dominique Sauquet
> Direction des Moyens Informatiques
> Tel : 01 46 84 13 12
> <ma...@prosodie.com>
>
> Prosodie
> 150, rue Galliéni
> 92100 Boulogne
> <http://www.prosodie.com/>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org