3

Does anyone know where I can get a canonical XML document that uses every feature of the XML 1.0 specification that aren't mutually exclusive?

Not including various encoding flavors.

If I can get a single document encoded in UTF-8 that would be fine.

cHao
  • 84,970
  • 20
  • 145
  • 172
  • 1
    What do you mean by *every feature*? What is a *feature* of an XML document? – Darin Dimitrov Jun 01 '11 at 22:14
  • What's your use case? The obvious one - writing a parser - has probably already been done for your language. If you want, say, a stripped-down parser for an embedded system, you probably don't want to implement *every* feature of XML, just the ones you need. – TrueWill Jun 01 '11 at 22:29
  • @Darin every feature of XML is in the 1.0 specification. –  Jun 02 '11 at 00:06
  • Somewhat related to this question: http://stackoverflow.com/questions/6187968/fuzz-testing-xml-parser – jasso Jun 02 '11 at 00:14
  • `` A canonical XML document can't use every XML feature, like self-closing tags. – jasso Jun 02 '11 at 00:20

1 Answers1

4

It is not possible for one single document to use every feature: for example if a document uses UTF-16 encoding then it cannot also use UTF-8 encoding.

The W3C XML 1.0 Conformance Test Suite can be downloaded from http://www.w3.org/XML/Test/

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • obviously you can't mix encodings, I am looking for a **canonical** XML file that represents all the features that are not mutually exclusive. –  Jun 02 '11 at 00:10
  • which file in the hundreds of files in the conformance suite matches my requirements? –  Jun 02 '11 at 00:10
  • @Jarrod-Roberson: No one and all of them. – Emiliano Poggi Jun 02 '11 at 19:38