Sometimes, the full XML specification is just overkill. If all you want to do is extract plain data from an XML file, using a conformant parser sometimes gets in the way.
I've been looking at writing a minimal parser for text processing and will no doubt write about my experiences here. In the mean-time, I've prepared a cut-down version of the formal EBNF
here.
 |
comment |
 |
processing_instruction |
 |
character_entity |
 |
text |
 |
attribute |
 |
element |
 |
miscellaneous |
 |
doctype_declaration |
 |
doctype_parameter |
 |
doctype |
 |
document |