summaryrefslogtreecommitdiff
path: root/cesar/ecos/packages/services/ezxml/current/doc
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/ecos/packages/services/ezxml/current/doc')
-rw-r--r--cesar/ecos/packages/services/ezxml/current/doc/ezxml.html121
-rw-r--r--cesar/ecos/packages/services/ezxml/current/doc/ezxml.txt84
-rw-r--r--cesar/ecos/packages/services/ezxml/current/doc/license.txt20
3 files changed, 225 insertions, 0 deletions
diff --git a/cesar/ecos/packages/services/ezxml/current/doc/ezxml.html b/cesar/ecos/packages/services/ezxml/current/doc/ezxml.html
new file mode 100644
index 0000000000..2bd012d84d
--- /dev/null
+++ b/cesar/ecos/packages/services/ezxml/current/doc/ezxml.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>ezXML</title></head>
+ <body>
+ <h1>ezXML - XML Parsing C Library</h1>
+ <h3>version 0.8</h3>
+ <p>
+ ezXML is a C library for parsing XML documents inspired by
+ <a href="http://www.php.net/SimpleXML">simpleXML</a> for
+ PHP. As the name implies, it's easy to use. It's ideal for parsing xml
+ configuration files or REST web service responses. It's also fast and
+ lightweight (11k compiled). The latest version is available here:
+ <a href="http://prdownloads.sf.net/ezxml/ezxml-0.8.tar.gz?download"
+ >ezxml-0.8.tar.gz</a>
+ </p>
+
+ <b>Example Usage</b>
+ <p>
+ Given the following example xml document:
+ </p>
+ <code>
+ &lt;?xml version="1.0"?&gt;<br />
+ &lt;formula1&gt;<br />
+ &nbsp;&nbsp;&lt;team name="McLaren"&gt;<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&lt;driver&gt;<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;Kimi
+ Raikkonen&lt;/name&gt;<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;points&gt;45&lt;/points&gt;<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&lt;/driver&gt;<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&lt;driver&gt;<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;David
+ Coultard&lt;/name&gt;<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;points&gt;24&lt;/points&gt;<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&lt;/driver&gt;<br />
+ &nbsp;&nbsp;&lt;/team&gt;<br />
+ &lt;/formula1&gt;
+ </code>
+ <p>
+ This code snipped prints out a list of drivers, which team they drive for,
+ and how many championship points they have:
+ </p>
+ <code>
+ ezxml_t f1 = ezxml_parse_file("formula1.xml"), team, driver;<br />
+ const char *teamname;<br />
+ &nbsp;<br />
+ for (team = ezxml_child(f1, "team"); team; team = team->next) {<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;teamname = ezxml_attr(team, "name");<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;for (driver = ezxml_child(team, "driver"); driver;
+ driver = driver->next) {<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("%s, %s: %s\n",
+ ezxml_child(driver, "name")->txt, teamname,<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &nbsp;&nbsp;ezxml_child(driver, "points")->txt);<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;}<br />
+ }<br />
+ ezxml_free(f1);
+ </code>
+ <p>
+ Alternately, the following would print out the name of the second driver
+ of the first team:
+ </p>
+ <code>
+ ezxml_t f1 = ezxml_parse_file("formula1.xml");<br />
+ &nbsp;<br />
+ printf("%s\n", ezxml_get(f1, "team", 0, "driver", 1, "name", -1)->txt);
+ <br />ezxml_free(f1);
+ </code>
+ <p>
+ The -1 indicates the end of the argument list. That's pretty much all
+ there is to it. Complete API documentation can be found in ezxml.h.
+ </p>
+
+ <b>Known Limitations</b>
+ <ul>
+ <li>
+ No support for UTF-16, however UTF-8 is handled correctly. UTF-16
+ support is required for XML 1.0 conformity and will be implimented for
+ the 1.0 release.
+ <br />&nbsp;
+ </li>
+ <li>
+ Loads the entire xml document into memory at once and does not allow for
+ documents to be passed in a chunk at a time. Large xml files can still
+ be handled though through <code>ezxml_parse_file()</code> and
+ <code>ezxml_parse_fd()</code>, which use mmap to map the file to a
+ virtual address space and rely on the virtual memory system to page in
+ data as needed.
+ <br />&nbsp;
+ </li>
+ <li>
+ Ignores DTDs. Parsing of the internal DTD subset is required for XML 1.0
+ conformity and will be implimented for the 1.0 release. ezXML is not,
+ and is not likely to become, a validating parser.
+ <br />&nbsp;
+ </li>
+ <li>
+ In making the character content of tags easy to access, there is no
+ way provided to keep track of the location of sub tags relative to the
+ character data. Example:
+ <p>
+ <code>&lt;doc&gt;line one&lt;br/&gt;<br />line two&lt;/doc&gt;</code>
+ </p>
+ <p>
+ The character content of the doc tag is reported as
+ <code>"line one\nline two"</code>, and <code>&lt;br/&gt;</code> is
+ reported as a sub tag, but the location of <code>&lt;br/&gt;</code>
+ within the character data is not. The function
+ <code>ezxml_toxml()</code> will convert an ezXML structure back to xml
+ with sub tag locations intact.
+ </p>
+ </li>
+ </ul>
+
+ <b>Licensing</b>
+ <p>
+ ezXML was written by Aaron Voisine and is distributed under the terms of
+ the <a href="license.txt">MIT license</a>.
+ </p>
+ </body>
+</html>
diff --git a/cesar/ecos/packages/services/ezxml/current/doc/ezxml.txt b/cesar/ecos/packages/services/ezxml/current/doc/ezxml.txt
new file mode 100644
index 0000000000..2968e131db
--- /dev/null
+++ b/cesar/ecos/packages/services/ezxml/current/doc/ezxml.txt
@@ -0,0 +1,84 @@
+ezXML - XML Parsing C Library
+version 0.8
+
+ezXML is a C library for parsing XML documents inspired by simpleXML for PHP.
+As the name implies, it's easy to use. It's ideal for parsing xml configuration
+files or REST web service responses. It's also fast and lightweight (11k
+compiled). The latest version is available here:
+http://prdownloads.sf.net/ezxml/ezxml-0.8.tar.gz?download
+
+Example Usage
+
+Given the following example xml document:
+
+<?xml version="1.0"?>
+<formula1>
+ <team name="McLaren">
+ <driver>
+ <name>Kimi Raikkonen</name>
+ <points>45</points>
+ </driver>
+ <driver>
+ <name>David Coultard</name>
+ <points>24</points>
+ </driver>
+ </team>
+</formula1>
+
+This code snipped prints out a list of drivers, which team they drive for,
+and how many championship points they have:
+
+ezxml_t f1 = ezxml_parse_file("formula1.xml"), team, driver;
+const char *teamname;
+
+for (team = ezxml_child(f1, "team"); team; team = team->next) {
+ teamname = ezxml_attr(team, "name");
+ for (driver = ezxml_child(team, "driver"); driver; driver = driver->next) {
+ printf("%s, %s: %s\n", ezxml_child(driver, "name")->txt, teamname,
+ ezxml_child(driver, "points")->txt);
+ }
+}
+ezxml_free(f1);
+
+Alternately, the following would print out the name of the second driver of the
+first team:
+
+ezxml_t f1 = ezxml_parse_file("formula1.xml");
+
+printf("%s\n", ezxml_get(f1, "team", 0, "driver", 1, "name", -1)->txt);
+ezxml_free(f1);
+
+The -1 indicates the end of the argument list. That's pretty much all
+there is to it. Complete API documentation can be found in ezxml.h.
+
+Known Limitations
+
+- No support for UTF-16, however UTF-8 is handled correctly. UTF-16 support is
+ required for XML 1.0 conformity and will be implimented for the 1.0 release.
+
+- Loads the entire xml document into memory at once and does not allow for
+ documents to be passed in a chunk at a time. Large xml files can still be
+ handled though through ezxml_parse_file() and ezxml_parse_fd(), which use mmap
+ to map the file to a virtual address space and rely on the virtual memory
+ system to page in data as needed.
+
+- Ignores DTDs. Parsing of the internal DTD subset is required for XML 1.0
+ conformity and will be implimented for the 1.0 release. ezXML is not, and is
+ not likely to become, a validating parser.
+
+- In making the character content of tags easy to access, there is no way
+ provided to keep track of the location of sub tags relative to the character
+ data. Example:
+
+ <doc>line one<br/>
+ line two</doc>
+
+ The character content of the doc tag is reported as "line one\nline two", and
+ <br/> is reported as a sub tag, but the location of <br/> within the
+ character data is not. The function ezxml_toxml() will convert an ezXML
+ structure back to xml with sub tag locations intact.
+
+Licensing
+
+ezXML was written by Aaron Voisine <aaron@voisine.org> and is distributed under
+the terms of the MIT license, described in license.txt.
diff --git a/cesar/ecos/packages/services/ezxml/current/doc/license.txt b/cesar/ecos/packages/services/ezxml/current/doc/license.txt
new file mode 100644
index 0000000000..fec5654bb4
--- /dev/null
+++ b/cesar/ecos/packages/services/ezxml/current/doc/license.txt
@@ -0,0 +1,20 @@
+Copyright 2004 Aaron Voisine <aaron@voisine.org>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.