[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Cloning XML
- From: Jay Carlson <nop@...>
- Date: Mon, 18 May 2015 17:15:43 -0400
On 2015-05-18, at 11:36 AM, Tim Channon <email@example.com> wrote:
> * not allowed self closing tags are not illegal by XML rules and here there is erratic usage of named or self closing for the same tags within one file. eg. both <text> </text> and <text> />
I think everybody should use a fully-conforming parser like expat, or something that uses like expat, while getting started on XML.
expat delivers an open event and a close event for every tag. Empty tags in XML can be written two different but equivalent ways.
expat does not distinguish character data expressed as CDATA encoding, just as it does not distinguish &# references.
expat signals an error on character set issues.
These all reflect the XML Infoset, which is the only data guaranteed to be communicated between parties using XML.
I should probably implement lazykit in modern Lua one of these decades….