Tcl Library Source Code

Documentation
Login


[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

NAME

xsxp - eXtremely Simple Xml Parser

Table Of Contents

SYNOPSIS

package require Tcl 8.5 9
package require xsxp 1.1
package require xml

xsxp::parse xml
xsxp::fetch pxml path ?part?
xsxp::fetchall pxml_list path ?part?
xsxp::only pxml tagname
xsxp::prettyprint pxml ?chan?

DESCRIPTION

This package provides a simple interface to parse XML into a pure-value list. It also provides accessor routines to pull out specific subtags, not unlike DOM access. This package was written for and is used by Darren New's Amazon S3 access package.

This is pretty lame, but I needed something like this for S3, and at the time, TclDOM would not work with the new 8.5 Tcl due to version number problems.

In addition, this is a pure-value implementation. There is no garbage to clean up in the event of a thrown error, for example. This simplifies the code for sufficiently small XML documents, which is what Amazon's S3 guarantees.

Copyright 2006 Darren New. All Rights Reserved. NO WARRANTIES OF ANY TYPE ARE PROVIDED. COPYING OR USE INDEMNIFIES THE AUTHOR IN ALL WAYS. This software is licensed under essentially the same terms as Tcl. See LICENSE.txt for the terms.

COMMANDS

The package implements five rather simple procedures. One parses, one is for debugging, and the rest pull various parts of the parsed document out for processing.

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category amazon-s3 of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

When proposing code changes, please provide unified diffs, i.e the output of diff -u.

Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.

KEYWORDS

dom, parser, xml

CATEGORY

Text processing

COPYRIGHT

2006 Darren New. All Rights Reserved.