Basic Edition: Free
Standard Edition: $19.95

Minimum Requirements
Buy Now
Comparing the XML Library with Revolution's revXML.DLL
The STS XML Library was originally developed before Runtime Revolution came out with their own method of parsing/managing XML, the external DLL file called revXML.dll. As such, it is logical that there be some comparison between the two in order to make the proper decision as to which to use, or for the purposes of migrating from one to the other.

For that purpose, the comparison below is divided into two parts - the "product" itself (how it was built, what its strengths and weaknesses are) and then comparing the individual commands/functions/methods to see how they compare.

Comparing the Products
The table below summarizes the comparison of the two products:

Feature STS XML Library revXML.DLL
Written in Transcript C++
Supports reading XML data Yes Yes
Supports writing XML data Yes (Standard only) Yes
Supports DTDs No Yes
Supports SOAP No Yes
Can handle multiple XML documents Yes Yes
Can accept and parse badly formatted XML Yes (optional) Yes (optional)1
Modifiable by the end user Yes (Standard only) No
Can manipulate node types other than element and text nodes (comments, processing instructions, XML declarations)2 Yes No
Maintains original whitespace in XML when retrieving the XML tree as text Yes No
Normalizes data node contents Yes No
Documentation Comprehensive Good
Includes sample XML Yes Yes
Requires additional file(s) to install No Yes
1 Although you can set a flag that tells the revXML.dll to only accept well-formed XML, it apparently doesn't consider the XML declaration (e.g. <? xml version="1.0" ?>) in its consideration of well- or poorly-formed XML. The XML Library does, however, so XML documents without the XML declaration will return a parsing error.
2 The revXML.dll can manipulate CDATA nodes, but not easily. You need to create an XML template with your CDATA tags, and then use revAppendXML to add it to your document and then revPutIntoXMLNode to populate it.

The XML Library, since it is written in Transcript is both modifiable (as long as you have the Standard version) and doesn't require any add-ons. However, since it is written in Transcript, it is not nearly as fast as the revXML.dll in parsing large XML documents. In fact, if you need to parse XML documents with thousands of nodes, the XML Library will most likely be too slow for your needs. It also doesn't support SOAP or DTDs, as the revXML.dll does; however the documentation for the revXML.dll (according to reports) is not as good as the docs you are reading now, and the XML Library does do a good job at attempting to keep the whitespace from the original document intact when manipulating the data so that if you choose to write that XML back to a file, it is in a more human-readable form3.

Also one thing to note is that for some reason, the revXML.dll does not normalize the contents of a node, so this node:

<info>This          is          a         bunch        of       data</info>
when retrieved with revXMLNodeContents returns:
This          is          a         bunch        of       data
whereas when the same data is retrieved with the XML Library's stsXML_GetNodeData, returns:
This is a bunch of data
Normalizing of data is the standard set forth by the W3C with the only exception being CDATA nodes, whose content is left alone. This may be a bug in the revXML.dll, but is worth noting here.

Comparing the Methods
This table focuses on the XML Library, listing out all of its methods and comparing them against the revXML.dll to see if there are comparable matches:

STS XML Library Method revXML.DLL Function/Command Comments
Loading Methods
stsXML_LoadData revCreateXMLTree  
Document Management Methods
stsXML_CreateDocument revXML.dll cannot create the necessary XML declaration
stsXML_DeleteDocument revDeleteXMLTree  
stsXML_GetDocuments revXMLTrees  
Data/Text Methods
stsXML_GetNodeData revXMLNodeContents  
stsXML_SetNodeData revPutIntoXMLNode  
Attribute Methods
stsXML_CountAttributes You can use revXMLAttributes, then count the result
stsXML_CreateAttribute revSetXMLAttribute  
stsXML_DeleteAttribute The revXMLRemoveAttribute command is not documented and may not actually work (you can see it by getting the externalCommands from a stack that has the revXML.dll attached)
stsXML_GetAttribute revXMLAttribute  
stsXML_GetAttributes revXMLAttributes  
stsXML_HasAttribute You can use revXMLAttributes, then check the result to see if it contains the attribute you're looking for
stsXML_SetAttribute revSetXMLAttribute  
Search Methods
stsXML_FindNodesByAttribute revXMLMatchingNode  
Node Methods
stsXML_CreateNode revAddXMLNode
XML Library can create all different types of nodes (not just ELEM)
stsXML_DeleteNode revDeleteXMLNode  
stsXML_GetNodeXML revXMLChildContents
revXML.dll lets you specify depth; XML Library returns either the specified node, or all the children under the node specified
stsXML_GetNodeName Not necessary in revXML.dll since it works with paths and you need to know the name of the element ahead of time; XML Library lets you use either paths or node IDs, so this is useful if using node IDs
stsXML_GetNodeType revXML.dll does not work with any type other than ELEM
stsXML_GetRoot revXMLRootNode  
stsXML_IsEmptyElement revXML.dll can't tell the difference between <tag/> and <tag></tag>
Parent/Child Methods
stsXML_AppendChild revAddXMLNode XML Library can create all different types of nodes (not just ELEM)
stsXML_CountChildren revXMLNumberOfChildren  
stsXML_CountNamedChildren revXMLNumberOfChildren  
stsXML_GetChildren revXMLChildNames  
stsXML_GetFirstChild revXMLFirstChild  
stsXML_GetNamedChildren revXMLChildNames  
stsXML_GetNextSibling revXMLNextSibling  
stsXML_GetParent revXMLParent  
stsXML_GetPreviousSibling revXMLPreviousSibling  
stsXML_HasChildren Use revXMLChildNames, then return if the count = 0
Utility Methods
stsXML_clearCallback n/a  
stsXML_dump n/a  
stsXML_expand revXMLText XML Library maintains whitespace
stsXML_expandPaths n/a  
stsXML_getNodeID(s) n/a  
stsXML_getNodePath(s) n/a  
stsXML_isDocument revXMLTree  
stsXML_isType revXML.dll does not work with any types other than ELEM
stsXML_libVersion n/a  
stsXML_normalize revXML.dll does not do any normalization of data
stsXML_reset revDeleteAllXMLTrees  
stsXML_setCallback n/a