Representative sample test XML file

扶醉桌前 提交于 2020-01-05 07:41:07

问题


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


回答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



来源:https://stackoverflow.com/questions/6999739/representative-sample-test-xml-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!