Kuldip,
I'm not sure that your posting has anything to do with JSP, but anyway,
you appear to be misunderstanding what is meant by "EMPTY" element.
This is an element with no content.
<child></child>
This is an EMPTY element
<child/>
In XML an empty element can have attributes, but cannot contain child
elements or text data.
So, if you have this:
<child>
<subelement sr="1">may have more child </subelement>
<subelement sr="2">may have more child </subelement>
</child>
and you delete the subelements, the result will be
<child></child>
I hope I have understood you properly.
Grant Doran
Middleware Team
NSW Dept. Education and Training
-----Original Message-----
From: Singh Kuldip [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 23 March 2000 16:36
To: [EMAIL PROTECTED]
Subject: PROBLEM IN DELETING ELEMENTS FROM XML BY SUN'S DOM PARSER
HI
when it deletes the element then it insert the text element with null
value i.e
<root>
<child>
<delete sr="1">may have more child </delete>
<delete sr="2">may have more child </delete>
</child>
<child2> hvfgdfdfghfghgf </child2>
</root>
now use sun's dom pareser which is based opon SAX to delete the bith delete
elements then it gives
<root>
<child>
</child>
<child2> hvfgdfdfghfghgf </child2>
</root>
insted of giving
<root>
<child/>
<child2> hvfgdfdfghfghgf </child2>
</root>
to deletes these elements i am useing removeChild() method. please write
the solution/comments in detail
thanx
kuldip
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets