Title: RE: removing element from XML file


if (aNode.getParentNode() != null) aNode.getParentNode().removeChild(aNode);

where aNode = <security-role>

regards...

-----Original Message-----
From: ZILBER,LEONID (HP-NewJersey,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Friday, 15 March 2002 16:26
To: '[EMAIL PROTECTED]'
Subject: removing element from XML file


Hi guys,

Suppose, I have the following XML file. How can I remove <security-role>
element from the file using DOM parser?

<?xml version="1.0" encoding="UTF-8"?>
<application>

   <icon>
      <small-icon> default small_icon</small-icon>
      <large-icon> default large_icon</large-icon>
   </icon>

   <display-name>test</display-name>
   <description>test</description>

   <security-role>
      <description> default sec_description</description>
      <role-name> default sec_role_name</role-name>
   </security-role>

</application>

Thank you,
-----------
Leon Zilber
HP Internet Operation R&D Lab
phone: 973.443.78.82
email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to