1

I'm looking for a somewhat representative sample test XML file for a typical application. It should contain all typical XML features, such as

  • Elements with and without attributes
  • Text (both structured and unstructured)
  • Namespaces
  • CDATA
  • DTD / Entity declarations
  • Comments
  • Processing instructions

And some half-sensible data of around 50kb or more. Does anyone know such a sample document? It should have a license compatible with Apache 2.0 or similar

Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509

1 Answers1

1
  • You can have a look at XSL examples like this involving either XML with DTD and XSL. All three are XML documents each one with an (almost) full set of XML features.

  • For other basic documents involving namespace and attributes you might be interested in looking at the W3C XSL test suite. For example, you can directly download a .fo basic file from FOP vendor.

  • Other, obvious, place to gather useful examples is at the various tutarials of W3School like in DTD examples, SOAP examples, XML CData examples and so on

Emiliano Poggi
  • 24,390
  • 8
  • 55
  • 67
  • 1
    Thanks for those links. I'm not sure about the license of w3school documents, but there are some representative samples among them, which I can anonymise... – Lukas Eder Aug 10 '11 at 08:09