Re: how to get the tag name when using sax/stax by recursion!
Srinivasa Nayak <[email protected]> Fri, 11 Jun 2004 09:39:09 +0530
| Newsgroups | gmane.comp.java.sun.xml.general,gmane.spam.detected |
|---|---|
| Message-ID | <[email protected]> |
The simplest thing will be use the BufferedInputStream or any Reader to read the XML file. Need not parse the xml... -----Original Message----- From: XML technologies in the Java Platform [mailto:[email protected]]On Behalf Of steamup Sent: Friday, June 11, 2004 9:11 AM To: [email protected] Subject: how to get the tag name when using sax/stax by recursion! hi, all! I have a question. when I use the SAX/StAX to process my xml by recursion, I can't output the name of the tags. I only can get the content of the tag. for example: <root> <Header> <TransactionID>ARSD</TransactionID> <ScreenName>ARSD00</ScreenName> <RequestID>1084366372537</RequestID> </Header> </root> my current output is: ARSD ARSD00 1084366372537 what i want is a string output: <root><Header><TransactionID>ARSD</TransactionID><ScreenName>ARSD00</ScreenN ame><RequestID>1084366372537</RequestID><RequestID>1084366372537</RequestID> </Header></root> which function should i use? thx! your early response would be highly appreciated! jason __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ ----------------------------------------------------- xml-interest: A list for discussing XML technologies in the Java Platform. To post, mailto:[email protected] Archives at: http://archives.java.sun.com/xml-interest.html To unsubscribe, mailto:[email protected] the following message; signoff xml-interest. ----------------------------------------------------- xml-interest: A list for discussing XML technologies in the Java Platform. To post, mailto:[email protected] Archives at: http://archives.java.sun.com/xml-interest.html To unsubscribe, mailto:[email protected] the following message; signoff xml-interest.