[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a few short notes



Paul Robinson <paul@xxxxxxxxxxxxxxx> writes:
> It's a text string. It's de-limited with tags. Tags are text
> surrounded by < and >. Sometimes they have /, " and = characters in
> them that change the way to treat either the tag, or the data inside
> the tag.
> 
> That's it. 

No, it isn't.  First, you've hardly done the content of tags justice -
you need to discuss proper nesting, the prolog, namespaces, quoting
rules, processing instructions, comments and so forth. Second, you
forgot character sets, entities (both kinds), and CDATA sections.

> It's BECAUSE of the incredibly strict rules you have to
> follow that it is easy to write tools that handle XML.
> 
> If you can't write something like the above in say 12-20 lines, plus
> standard #include'ed files in C (stdio.h), perhaps you'd like to
> consider hiring me as a consultant? :-)

Assuming you're not talking about natural C, not obfuscated C, I'd
like to see that 12 line XML parser.
-- 
  __  Paul Crowley
\/ o\ sig@xxxxxxxxxxxxxxxxxxx
/\__/ http://www.ciphergoth.org/