W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

extract a portion of XML file using DOM

From: Andrew Anand <anand.andrew@fedex.com>
Date: Thu, 5 Jul 2001 14:46:24 -0500
To: "WWW DOM" <www-dom@w3.org>
Cc: "Andrew Anand" <andrewms@hotmail.com>, "anand" <anand.andrew@fedex.com>
Message-ID: <JBEPLAFFGEKDEAPHMEGFMEKICBAA.anand.andrew@fedex.com>
Is possible to extract a portion of XML file as it is using DOM.

Discussion:
--------------- XML file -----------------
<personal>
<name>JamesBond</name>
<myaddress>678 watergr drive </myaddress>

<miscellanoues>
<dream>XML</dream>
<hobby>billiards<hobby>
</miscellanoues>

</personal>
---------------------XML file ends-----------
Question:
Using DOM is it possible to extract value of element <miscellanoues>, say
using some form of getElementsByTagName(),
in to string as,(a chunk of XML file as it is)
String strmiscellanoues =myDOM.(some form
of)getElementsByTagName(miscellanoues)
Result:strmiscellanoues=<dream>XML</dream><hobby>billiards<hobby>
 Is this possible ?


I would appreciate your answer.
thanks,
Andrew
Received on Thursday, 5 July 2001 15:45:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:49 GMT