[
Lists Home |
Date Index |
Thread Index
]
- From: David Megginson <david@megginson.com>
- To: xml-dev@ic.ac.uk
- 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
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|