File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes help with removing child node Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "help with removing child node" Watch "help with removing child node" New topic
Author

help with removing child node

karthik sudarshan
Greenhorn

Joined: May 25, 2007
Posts: 4
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
Bartender

Joined: Oct 14, 2005
Posts: 18712
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help with removing child node