Mini-XML: Lightweight XML Support Library
Recent News
$result = db_query("SELECT * FROM article WHERE is_published = 1 "
."ORDER BY modify_date DESC LIMIT 3");
$count = db_count($result);
while ($row = db_next($result))
{
$id = $row['id'];
$title = htmlspecialchars($row['title']);
$abstract = htmlspecialchars($row['abstract']);
$date = date("H:i M d, Y", $row['modify_date']);
$count = count_comments("articles.php_L$id");
if ($count == 1)
$count .= " comment";
else
$count .= " comments";
print("$date, $count
\n"
."$title - $abstract
\n");
}
db_free($result);
?>
About Mini-XML
Mini-XML is a small XML parsing library that you can use to read
XML and XML-like data files in your application without requiring
large non-standard libraries. Mini-XML only requires an ANSI C
compatible compiler (GCC works, as do most vendors' ANSI C
compilers) and a 'make' program.
Mini-XML provides the following functionality:
- Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded
XML files and strings.
- Data is stored in a linked-list tree structure,
preserving the XML data hierarchy.
- Supports arbitrary element names, attributes, and
attribute values with no preset limits, just available
memory.
- Supports integer, real, opaque ("cdata"), and text data
types in "leaf" nodes.
- Functions for creating, indexing, and managing trees of
data.
- "Find" and "walk" functions for easily locating and
navigating trees of data.
html_footer(); ?>