logo

libbulletml

Library of Bullet Markup Language (forked from https://shinh.skr.jp/libbulletml/index_en.html )git clone https://hacktivis.me/git/libbulletml.git

readme.txt (7955B)


  1. /** @mainpage
  2. <b> TinyXml </b>
  3. TinyXml is a simple, small, C++ XML parser that can be easily
  4. integrating into other programs.
  5. <b> What it does. </b>
  6. In brief, TinyXml parses an XML document, and builds from that a
  7. Document Object Model that can be read, modified, and saved.
  8. XML stands for "eXtensible Markup Language." It allows you to create
  9. your own document markups. Where HTML does a very good job of marking
  10. documents for browsers, XML allows you to define any kind of document
  11. markup, for example a document that describes a "to do" list for an
  12. organizer application. XML is a very structured and convenient format.
  13. All those random file formats created to store application data can
  14. all be replaced with XML. One parser for everything.
  15. There are different ways to access and interact with XML data.
  16. TinyXml uses a Document Object Model, meaning the XML data is parsed
  17. into a tree objects that can be browsed and manipulated, and then
  18. written back to disk. You can also construct an XML document from
  19. scratch with C++ objects and write this to disk.
  20. TinyXml is designed to be easy and fast. It is one header and three cpp
  21. files. Simply add these to your project and off you go. There is an
  22. example to get you started. It is released under the ZLib license,
  23. so you can use it in open source or commercial code.
  24. It attempts to be a flexible parser, but with truly correct and
  25. compliant XML output (with the exception of the character set,
  26. below.) TinyXml should compile on any reasonably C++
  27. system. It does not rely on exceptions or RTTI, and only uses the STL
  28. string class.
  29. <b> What it doesn't do. </b>
  30. It doesn’t parse or use DTDs (Document Type Definitions) or XSL’s
  31. (eXtensible Stylesheet Language.) It is limited to the ASCII
  32. character set. There are other parsers out there (check out
  33. www.sourceforge.org, search for XML) that are much more fully
  34. featured. But they are also much bigger, take longer to set up in
  35. your project, have a higher learning curve, and have a more
  36. restrictive license. If you are working with browsers or have more
  37. complete XML needs, TinyXml is not the parser for you.
  38. <b> Code Status. </b>
  39. Currently in use, TinyXml is looking pretty stable. If you find
  40. bugs, send them in and we'll get them straightened out as soon as possible.
  41. It currently does not recognize "entity references", meaning special
  42. characters. This is a missing feature that will hopefully be
  43. included soon. Namely:
  44. @verbatim
  45. &amp; &
  46. &lt; <
  47. &gt; >
  48. &quot; "
  49. &apos; ‘
  50. @endverbatim
  51. <b> Using and Installing </b>
  52. To Compile and Run xmltest:
  53. A Linux Makefile and a Windows Visual C++ .dsp file is provided.
  54. Simply compile and run. It will write the file demotest.xml to your
  55. disk and generate output on the screen. It also tests walking the
  56. DOM by printing out the number of nodes found using different
  57. techniques.
  58. The Linux makefile is very generic and will
  59. probably run on other systems, but is only tested on Linux. Make
  60. sure to run 'make depend' before you make, so you don't pick
  61. up incorrect dependencies.
  62. To Use in an Application:
  63. Add tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, and tinyxmlparser.cpp to your
  64. project or make file. That's it! It should compile on any reasonably
  65. compliant C++ system. You do not need to enable exceptions or
  66. RTTI for TinyXml.
  67. <b> Where it may go. </b>
  68. At this point, I'm focusing on tightening up remaining issues.
  69. Bug fixes (though comfortably rare) and minor interface
  70. corrections.
  71. On the "it would be nice if..." list is:
  72. - More intelligent (and consistent) parsing would
  73. be worthwhile; the parser is somewhat "organic" in its current form.
  74. - Entities.
  75. I'm not currently working on either; but would ethusiastically welcome
  76. a patch!
  77. In the future, I think it would be great if XSL and DTDs were added
  78. in some scalable way. So TinyXml would become a stand-alone core
  79. component of say MedXml (adding DTDs) and LargeXml( adding XSL.) :-)
  80. <b> How TinyXml works. </b>
  81. An example is probably the best way to go. Take:
  82. @verbatim
  83. <?xml version="1.0" standalone=‘no’>
  84. <?-- Our to do list data -->
  85. <ToDo>
  86. <Item priority="1"> Go to the <bold>Toy store!</bold></Item>
  87. <Item priority="2"> Do bills</Item>
  88. </ToDo>
  89. @endverbatim
  90. It’s not much of a To Do list, but it will do. To read this file
  91. (say "demo.xml") you would create a document, and parse it in:
  92. @verbatim
  93. TiXmlDocument doc( "demo.xml" );
  94. doc.LoadFile();
  95. @endverbatim
  96. And it’s ready to go. Now let’s look at some lines and how they
  97. relate to the DOM.
  98. <?xml version="1.0" standalone=‘no’>
  99. The first line is a declaration, and gets turned into the
  100. TiXmlDeclaration class. It will be the first child of the
  101. document node.
  102. This is the only directive/special tag parsed by by TinyXml.
  103. Generally directive targs are stored in TiXmlUnknown so the
  104. commands won’t be lost when it is saved back to disk.
  105. <?-- Our to do list data -->
  106. A comment. Will become a TiXmlComment object.
  107. <ToDo>
  108. The ToDo tag defines a TiXmlElement object. This one does not have
  109. any attributes, but will contain 2 other elements, both of which
  110. are items.
  111. <Item priority="1">
  112. Creates another TiXmlElement which is a child of the "ToDo" element.
  113. This element has 1 attribute, with the name ‘priority’ and the value
  114. ‘1’.
  115. Go to the
  116. A TiXmlText. This is a leaf node and cannot contain other nodes.
  117. It is a child of the ‘Item" Element.
  118. <bold>
  119. Another TiXmlElement, this one a child of the "Item" element.
  120. Etc.
  121. Looking at the entire object tree, you end up with:
  122. @verbatim
  123. TiXmlDocument "demo.xml"
  124. TiXmlDeclaration "version='1.0'" "standalone=‘no’"
  125. TiXmlComment " Our to do list data"
  126. TiXmlElement "ToDo"
  127. TiXmlElement "Item" Attribtutes: priority = 1
  128. TiXmlText "Go to the "
  129. TiXmlElement "bold"
  130. TiXmlText "Toy store!"
  131. TiXmlElement "Item" Attributes: priority=2
  132. TiXmlText "bills"
  133. @endverbatim
  134. <b> Contributors </b>
  135. Thanks very much to everyone who sends suggestions, bugs, ideas, and
  136. encouragement. It all helps.
  137. Major contributors to the project:
  138. <ul>
  139. <li> Lee Thomason wrote the original code and maintains the project.</li>
  140. <li> Ayende Rahien presented code, ideas, and changes that became
  141. the 1.1.0 version of TinyXml.</li>
  142. <li> Ville Nurmi provided ideas, bugs, and feedback.</li>
  143. </ul>
  144. <b> Documentation </b>
  145. The documentation is build with Doxygen, using the 'dox'
  146. configuration file.
  147. <b> License </b>
  148. TinyXml is released under the zlib license:
  149. This software is provided 'as-is', without any express or implied
  150. warranty. In no event will the authors be held liable for any
  151. damages arising from the use of this software.
  152. Permission is granted to anyone to use this software for any
  153. purpose, including commercial applications, and to alter it and
  154. redistribute it freely, subject to the following restrictions:
  155. 1. The origin of this software must not be misrepresented; you must
  156. not claim that you wrote the original software. If you use this
  157. software in a product, an acknowledgment in the product documentation
  158. would be appreciated but is not required.
  159. 2. Altered source versions must be plainly marked as such, and
  160. must not be misrepresented as being the original software.
  161. 3. This notice may not be removed or altered from any source
  162. distribution.
  163. <b> References </b>
  164. The World Wide Web Consortium is the definitive standard body for
  165. XML, and there web pages contain huge amounts of information. I also
  166. recommend "XML Pocket Reference" by Robert Eckstein and published by
  167. O’Reilly.
  168. <b> Contact Me: </b>
  169. I’d appreciates your suggestions, and would love to know if you
  170. use TinyXml. I hope you enjoy it and find it useful.
  171. Lee Thomason
  172. leethomason@mindspring.com
  173. */