W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

How to create a DOM object out of a String ?

From: Harikrishnan R Kurup <harikrishnan.kurup@wipro.com>
Date: Mon, 23 Oct 2000 19:09:57 +0530
Message-ID: <002901c03cf6$bc0f13e0$af01a4a4@wipsys.soft.net>
To: <www-dom@w3.org>
Hi,
How to parse XML String using DOM Parser.
Like :
String str =<FTG> <man>maneesh</man><man1>Hari</man1><FTG> 

Then how to parse it using DOM parser(SUN Parser).
One possible solution is writing in a file and saving it with .xml extension and then parsing a file .
DOMParser parser = new DOMParser();    //// this is a code using IBM XML4J .
parser.parse(URI);

URI = location of file like c:\man\man.xml;

But apart from this IS There any other solution . If yes , then pl. get back to us ?

Thanks,
Hari.
________________________________________________

If confusion is the first step to knowledge, I must be a genius.
Received on Monday, 23 October 2000 09:47:53 GMT

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