0

I am struck in renaming a Node in XML using Javascrip/Jquery.

I tried using renameNode.. But it's not supported in none of the standard browsers i.e., Chrome, Mozilla etc

The requirement is as follows:

I have the following tree structure:

<attribute>
<basic_attribute>Some text</basic_Attribute>
</attribute>

Want it to rename as :

<attribute>
<symbolic_name>Some text</symbolic_name>
</attribute>

A small hint would work fine for me.

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
BPD1
  • 137
  • 1
  • 2
  • 11
  • What jQuery code have you tried? – James A Mohler Apr 15 '15 at 05:25
  • I didn't tried in Jquery. I tried in Javascript the follwoing if(xmldoc.childNodes[0].childNodes[0]== "basic_Attribute"){ xmldoc.childNodes[0].childNodes[0].renameNode("symbolic_Name",null,"basicAttribute"); } – BPD1 Apr 15 '15 at 05:29
  • @Brijesh See http://stackoverflow.com/questions/4998357/javascript-how-to-change-a-nodes-name – guest271314 Apr 15 '15 at 07:02

0 Answers0