Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with removing child node

 
karthik sudarshan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All, I have a DOM xml as follows

<pXML>
<Type>Trial</Type>
<SXML>
<Record FREQ="Monthly" MODE="Advanced" >
<PText p_text="abc."/>
<PText p_text="xyz."/>
</Record>
</SXML>
</pXML>

I want to delete only the 2nd child of Record (p_text = "xyz")
Now assuming I have named my xml as xmlDOM, this call actually points to the node I want to delete

alert(xmlDOM.documentElement.childNodes(1).childNodes(0).childNodes(1));

I now need some help to delete this childnode only. I want to retain the p_text = "abc".

Thanks in advance
 
Paul Clapham
Sheriff
Posts: 21126
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are asking how to do that in Javascript, right? I think that question would get a better answer in our HTML and Javascript forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic