|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Handler for xml declaration
Use Expat directly, instead of via the SAX driver. Originally written by James Clark, it is now maintained on Source Forge at http://sourceforge.net/projects/expat/. If you are working in Perl, use can use the XML::Parser module (which uses expat and exposes this capability). At 08:35 PM 3/12/01 -0800, Jenny Lam wrote: >Charles, > >If I choose to stay with SAX instead of using DOM, is >there a work around to retrieve the xml declaration >info from the parser? > >Thanks, >Jenny >--- Charles Reitzel <creitzel@m...> wrote: >> The DOM supports this, as does expat, XML::Parser in >> Perl. >> SAX doesn't. >> >> My theory why not is that SAX deals primarily w/ an >> InputSource. >> You need all the information in the XML declaration >> to fire up >> the right parser (version) and create a correct >> InputSource >> (encoding). The standalone "attribute" is only a >> hint, really. >> >> To get more info on the SAX2 extensions, check out >> the API docs >> for Apache Xerces at http://xml.apache.org. >> >> take it easy, >> Charles Reitzel >> >> At 05:53 AM 3/12/01 -0800, you wrote: >> >Hi, >> > >> >Is there a handler package that have a method for >> >xmlDecl? I read through the xml-dev archive and >> found >> >some old links that point to a package called >> >LexicalHandler in the SAX2 api. I downloaded the >> SAX2 >> >and its extension package from David Megginson >> >website; no xmlDecl method. Does anyone know why >> it >> >was removed? Any other method for getting the xml >> >declaration from the parser? >> > >> >TIA >> >Jenny >> > >> >__________________________________________________ >> >Do You Yahoo!? >> >Yahoo! Auctions - Buy the things you want at great >> prices. >> >http://auctions.yahoo.com/ >> > >> >>------------------------------------------------------------------ >> >The xml-dev list is sponsored by XML.org, an >> initiative of OASIS >> ><http://www.oasis-open.org> >> > >> >The list archives are at >> http://lists.xml.org/archives/xml-dev/ >> > >> >To unsubscribe from this elist send a message with >> the single word >> >"unsubscribe" in the body to: >> xml-dev-request@l... >> >> >> take it easy, >> Charles Reitzel >> >> > > >__________________________________________________ >Do You Yahoo!? >Yahoo! Auctions - Buy the things you want at great prices. >http://auctions.yahoo.com/ take it easy, Charles Reitzel
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








