Lists Home |
Date Index |
- From: David Megginson <email@example.com>
- To: firstname.lastname@example.org
- Date: Sat, 10 Apr 1999 18:26:30 -0400 (EDT)
Chris Lilley writes:
> Competition, for all those XML coders with <i>copious free time</i>:
> Write an incredibly small and fast special-purpose XML parser whose
> purpose is to locate and read the xml declaration; don't bother reading
> any more of the file once this is found.
> It should however cope with any well-formed XML instance.
Don't think you'd need much time -- if the document starts with the
characters "<?xml" it has an XML declaration, and if it doesn't, you
can stop reading. The hardest part is figuring out an approximate
encoding in the first place so that you can read the first five
characters, but the XML REC already has algorithms that can help.
All the best,
David Megginson email@example.com
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)