XmlNode
The XmlNode class is the base class used to represent the xml tree. The tree is built as a vector of
nodes. Each node owns as well its parent node. Walking in the tree is achieved by taking the child node
and then moving to the child and/or next node. The node also manages an empty flags. It the empty flag is
set, it is an error to add child nodes.
Predicate
node-p
Inheritance
Object
Methodsto-text->String(none)
The to-text method returns a text representation of the tree content. Unlike the write method, the
tag are not generated, but rather the text content is accumulated. This method is useful tor read
the node content. If a node does not have text, the nil string is returned.
write->none(none|OutputStream|Buffer)
The write method write the node contents as well as the child nodes to an output stream argument
or a buffer. When node is written, the method attempts to use the stream encoding in such way that
the contents fits into the requested output encoding. Without argument, the node is written to the
interpreter output stream. with one argument, the node is written to the specified stream or
buffer.
name-p->Boolean(String)
The name-p predicate checks if the name matches the node name. Care should be taken that not all
node have a name, and in such case, the false value is returned. This method is useful when the
node is a tag.
attribute-p->Boolean(String|StringString)
The attribute-p predicate checks if there is a node attribute that matches the string argument
name. In the first form, the predicate returns true is an attribute exists with the name argument.
In the second form, the predicate returns true if the attribute name and value matches the
arguments. The first argument is the attribute name. The second argument is the attribute value.
Not all nodes have attributes. In such case, the predicate always returns false.
parse->none(String)
The parse method parses the string argument and adds the results as a set of child node to the
calling node. If the node is an empty node, the method will almost fail. This method should be
used when an attempt is made to add some text that may contain some xml tags.
get-parent->XmlNode(none)
The get-parent method returns the parent node. If the node is the root node, nil is returned.
set-parent->none(XmlNode)
The set-parent method sets the parent node.
copy->XmlNode(none)
The copy method copy the node tree by regenerating a new tree.
del-child->none(Integer|String|StringString|StringStringString)
The del-child method deletes one or several child nodes. In the first form, the children is
deleted either by index or by name. When a string argument is used, several node might be removed.
In the second form, the child node name and attribute name must be matched. In the third form, the
child node name, attribute name and value must be matched.
del-attribute-child->none(String|StringString)
The del-attribute-child method deletes one or several child nodes. In the first form, the children
are deleted by attribute name. In the second form, the children are delete by attribute name and
value.
clear-child->none(none)
The clear-child method clear the child node list, leaving the node without child node.
add-child->none(XmlNode|XmlNodeInteger)
The add-child method adds a node argument as a child node to the calling node. In the first form,
the node is added at the end of the node list. In the second form, the node is added by index and
all subsequent nodes are shifted by one position.
get-child->XmlNode(IntegerString)
The get-child method returns a child node by index or by name. If the calling argument is an
integer, the node is returned by index. If the calling argument is a string, the node is returned
by name. If the node cannot be found, nil is returned raised.
get-index->Integer(XmlNode)
The gett-index method returns a child node index. The node argument is the node to find as a child
node. If the node is not found, an exception is raised.
merge->none(XmlNodeInteger)
The merge method merge an existing node with another one. The first argument is the source node
used for merging. The second argument the child node index to merge. The method operates by first
removing the child node at the specified index and then add in position, the child nodes of the
source node.
nil-child-p->Boolean(none)
The nil-child-p predicate returns true if the node does not have a child node.
child-p->Boolean(String|StringString|StringStringString)
The child-p predicate returns true if the node has a child with a node name argument. In the first
form, the name is to be matched by the predicate. In the second form, the node nae and the
attribute name must be matched. In the third form, the node name, attribute name and value must be
matched.
attribute-child-p->Boolean(StringString|StringStringString)
The attribute-child-p predicate returns true if the node has a child with an attribute name
argument. In the first form, the attribute name must be matched. In the second form, the attribute
name and value must be matched.
lookup-child->XmlNode(String)
The lookup-child method returns a child node by name. Unlike the get-child method, the method
raises an exception if the node cannot be found.
child-length->Integer(none|String)
The child-length method returns the number of children nodes. In the first form, without argument,
the total number of children nodes is returned. In the second form, the total number of nodes that
match the tag argument name is returned.
get-source-line->Integer(none)
The get-source-line method returns the node source line number if any.
set-source-line->none(Integer)
The set-source-line method sets the node source line number.
get-source-name->String(none)
The get-source-name method returns the node source name if any.
set-source-name->none(String)
The set-source-name method sets the node source name.
XmlTag
The XmlTag class is the base class used to represent a xml tag. A tag is defined with a name and an
attribute list. The tag is derived from the xml node class and is not marked empty by default.
Predicate
tag-p
Inheritance
XmlNode
ConstructorsXmlTag(String)
The XmlTag constructor creates a tag node. The node is not marked empty.
XmlTag(StringBoolean)
The XmlTag constructor creates a tag node. The first argument is the tag name. The second argument
is the empty flag.
Methodsset-name->none(String)
The set-name method sets the tag name.
get-name->String(none)
The get-name method returns the tag name.
clear-attribute->none(node)
The clear-attribute method clear the node attribute list.
add-attribute->none(Property)
The add-attribute method adds a new attribute to the tag. The attribute must be new for this
method to succeed. In doubt, the set-attribute is preferable.
set-attribute->none(StringLiteral)
The set-attribute method sets an attribute to the tag. The first argument is the attribute name.
The second argument is the attribute value. If the attribute already exists, the old value is
replaced with the new one.
get-attribute->Property(Integer|String)
The get-attribute method returns a tag attribute in the form o a property object. With an integer
object, the attribute is returned by index. With a string object, the property is return by name.
If the property is not found, nil is returned.
get-attribute-value->String(String)
The get-attribute-value method returns a tag attribute value by name. The string argument is the
attribute name. If the property is not found, an exception is raised.
lookup-attribute->Property(String)
The lookup-attribute method returns a tag attribute by name in the form of a property. The string
argument is the attribute name. If the property is not found, an exception is raised.
attribute-length->Integer(none)
The attribute-length method returns the number of attributes.
XmlText
The XmlText class is the xml text node. A text node is directly built by the xml reader and the content
placed into a string. By definition, a text node is an empty node.
Predicate
text-p
Inheritance
XmlNode
ConstructorsXmlText(none)
The XmlText constructor creates a default text node. By definition, a text node is an empty node.
XmlText(String)
The XmlText constructor creates a text node with the string argument.
Methodsset-xval->none(String)
The set-xval method sets the text node value.
get-xval->String(none)
The get-xval method returns the text node value.
to-normal->String(none)
The to-normal method returns the normalized text node value.
XmlData
The XmlData class is the xml CDATA node. A data node differs from the text node in the sense that the
data node contains characters that could be reserved characters such like markup delimiters. The data
node is most of the time used to hold text used for scripting. The data node is an empty node.
Predicate
data-p
Inheritance
XmlNode
ConstructorsXmlData(none)
The XmlData constructor creates a default data node. By definition, a data node is an empty node.
XmlData(String)
The XmlData constructor creates a data node with the string argument.
Methodsset-xval->none(String)
The set-xval method sets the data node value.
get-xval->String(none)
The get-xval method returns the data node value.
XmlComment
The XmlComment class is the xml comment node. The comment node is a special node that holds the comment
text. The comment node is an empty node.
Predicate
comment-p
Inheritance
XmlNode
ConstructorsXmlComment(none)
The XmlComment constructor creates a default comment node. By definition, a comment node is an
empty node.
XmlComment(String)
The XmlComment constructor creates a comment node with the string argument.
Methodsset-xval->none(String)
The set-xval method sets the comment node value.
get-xval->String(none)
The get-xval method returns the comment node value.
XmlDoctype
The XmlDoctype class is the xml document type node. In its simplest form, the document type has just a
name which acts the starting tag for the document. The document type can also be associated with a system
or a public identifier. Note also that a local root node can be attached to this node.
Predicate
doctype-p
Inheritance
XmlNode
ConstructorsXmlDoctype(String)
The XmlDoctype constructor creates a document type with a starting tag name as the string
argument. This is the simplest form of a document type definition.
XmlDoctype(StringString)
The XmlDoctype constructor creates a document type with a starting tag name and a system
identifier. The first string argument is the tag name. The second argument is the system
identifier.
XmlDoctype(StringStringString)
The XmlDoctype constructor creates a document type with a starting tag name, a public and a system
identifier. The first string argument is the tag name. The second argument is the public
identifier. The third argument is the system identifier.
Methodsget-xval->String(none)
The get-xval method returns the document type starting tag name.
get-public-id->String(none)
The get-public-id method returns the document type public identifier.
get-system-id->String(none)
The get-system-id method returns the document type system identifier.
XmlPi
The XmlPi class is the xml processing node. The processing node is a tag node. Although a processing node
is seen as tag with attributes, the specification describes the processing node as a special tag with a
string value. The processing node is an empty node.
Predicate
pi-p
Inheritance
XmlNode
ConstructorsXmlPi(String)
The XmlPi constructor creates a processing node with the name string argument.
XmlPi(StringString)
The XmlPi constructor creates a processing node with the name string argument and the string
value. The first argument is the tag name. The second argument is the processing node value.
Methodsset-name->none(String)
The set-name method sets the xml pi node name.
get-name->String(none)
The get-name method returns the pi node name.
set-xval->none(String)
The set-xval method sets the processing node value.
get-xval->String(none)
The get-xval method returns the processing node value.
map-xval->Plist(String)
The map-xval method map the processing node value to a property list.
XmlDecl
The XmlDecl class is the xml declaration node. The declaration node is a processing node. A declaration
node is defined with a version id, an encoding string and a standalone flag. Each value is represented by
an attribute at the tag level.
Predicate
decl-p
Inheritance
XmlPi
ConstructorsXmlDecl(none)
The XmlDecl constructor creates a default declaration node. By default, the declaration node is
set with the xml version 1.0, the UTF-8 encoding and the standalone flag is not set.
XmlDecl(String)
The XmlDecl constructor creates a declaration node with a version. The string argument is the xml
version version which must be a supported one.
XmlDecl(StringString)
The XmlDecl constructor creates a declaration node with a version and an encoding. The string
argument is the xml version version which must be a supported one. The second argument is the xml
encoding.
XmlDecl(StringStringString)
The XmlDecl constructor creates a declaration node with a version, an encoding and a standalone
flag. The string argument is the xml version version which must be a supported one. The second
argument is the xml encoding. The third argument is the standalone flag.
XmlRef
The XmlRef class is the xml reference node class. This class is a base class which cannot be instantiated
directly. The class is designed to hold reference, the only element which is in common is the string
representation.
Predicate
ref-p
Inheritance
XmlNode
Methodsset-xref->none(String)
The set-xref method sets the node reference name.
get-xref->String(none)
The get-xref method returns the node reference name.
XmlCref
The XmlCref class is the xml character reference node class. Normally this class should only be used when
building a xml tree manually. During a parsing process, the character reference is automatically
expanded.
Predicate
cref-p
Inheritance
XmlRef
ConstructorsXmlCref(none)
The XmlCref constructor creates a default character reference those value is the null character.
XmlCref(Character|Integer)
The XmlCref constructor creates a character reference those value is the character or integer
argument.
Methodsset-value->none(Character|Integer)
The set-value method sets the character reference value by character or integer.
get-value->Character(none)
The get-value method returns the character reference value.
XmlEref
The XmlEref class is the xml entity reference node class. The entity reference is defined with a
reference name.
Predicate
eref-p
Inheritance
XmlRef
ConstructorsXmlEref(none)
The XmlCref constructor creates an empty entity reference.
XmlCref(String)
The XmlEref constructor creates an entity reference those value is the string argument.
XmlSection
The XmlSection class is the xml section type node. A section node is used to model conditional section
that are part of a DTD. The section value is a string that is evaluated by the xml processor. Most of the
time, it is a parameter entity reference which corresponds to the keyword INCLUDE or IGNORE , but it
could be anything else. A node is also attached to this section.
Predicate
section-p
Inheritance
xmlNode
ConstructorsXmlSection(String)
The XmlSection constructor creates a xml section node by value.
Methodsget-xval->String(none)
The get-xval method returns the section node value.
XmlAttlist
The XmlAttlist class is the xml attribute list node class. A xml attribute list is primarily defined with
two names. The first name is the element and the second name is the attribute name. There are 3 types of
attribute list. The string type, the token type and the enumeration type. The class manages each type by
associating a type descriptor which is detected at construction.
Predicate
attlist-p
Inheritance
XmlNode
ConstructorsXmlAttlist(StringString)
The XmlAttlist constructor creates an attribute list by element name and attribute name. The first
argument is the element name. The second argument is the attribute name.
Methodsset-element-name->none(String)
The set-element-name method sets the attribute list element name.
get-element-name->String(none)
The get-element-name method returns the attribute list element name.
set-attribute-name->none(String)
The set-attribute-name method sets the attribute list name.
get-attribute-name->String(none)
The get-attribute-name method returns the attribute list name.
set-type->none(String|VectorBoolean)
The set-type method set the attribute type by string or enumeration vector. In its first form, the
attribute type is defined by a string. The type can be either, "CDATA", "ID", "IDREF", "IDREFS",
"ENTITY", "ENTITIES", "NMTOKEN" or "NMTOKENS". In the second form, the attribute type is an
enumeration those values are defined in the argument vector. The boolean argument controls the
notation flag for that enumeration.
set-default->none(String)
The set-default method set the attribute value by string. The string can be any value or the
special value "#IMPLIED" and "#REQUIRED". If the default value is fixed, the set-fixed is the
preferred method.
set-fixed->none(String)
The set-fixed method set the fixed attribute default value by string.
XmlRoot
The XmlRoot class is the top level root instantiated by the xml reader when starting to parse a stream.
There should be only one root node in a tree. The root node does not have a parent node.
Predicate
root-p
Inheritance
XmlNode
ConstructorsXmlRoot(none)
The XmlRoot constructor creates a default xml root node which is empty.
Methodsdup-body->XmlBody(none)
The dup-body method duplicates the root node by duplicating the root body without the declaration
node.
declaration-p->Boolean(none)
The declaration-p predicate returns true if a declaration node exists in the root node.
get-declaration->XmlDecl(none)
The get-declaration method returns the declaration node associated with the root node. Normally,
the declaration node is the first child node. If the declaration node does not exist, an exception
is raised.
get-encoding->String(none)
The get-encoding method returns the root encoding mode. The root encoding mode is extracted from
the declaration node, if such node exists, or the default xml system encoding is returned.
XmlDocument
The XmlDocument class is the xml document class. The document class is the root document class that
maintains a xml document along with its associated tree and other useful information. Generally the class
is constructed with a file name or a name and an input stream that is used for parsing the input data.
The document can also be designed by constructing manually the document tree. In that case, the document
name must be set explicitly.
Predicate
document-p
Inheritance
Nameable
ConstructorsXmlDocument(none)
The XmlDocument constructor creates a default xml document.
XmlDocument(String)
The XmlDocument constructor creates a xml document by parsing the file. The file name is the
string argument.
XmlDocument(StringInputStream)
The XmlDocument constructor creates a xml document by name and by parsing the input stream. The
first argument is the xml document name. The second argument is the input stream to parse.
XmlDocument(StringXmlRoot)
The XmlDocument constructor creates a xml document by name and root node. The first argument is
the xml document name. The second argument is the xml root node.
Methodsset-name->none(String)
The set-name method sets the xml document name. The get-name method is available from the nameable
base class.
get-root->XmlRoot(none)
The get-root method returns the document xml root node.
get-body->XmlRoot(none)
The get-body method returns the document xml root node body without the declaration node.
XmlElement
The XmlElement class is the xml element class node. A xml element is represented with a name and a value.
It is during the processing phase that the element value is interpreted. An element is built with a name
and a value.
Predicate
element-p
Inheritance
XmlNode
ConstructorsXmlElement(StringString)
The XmlElement constructor creates a xml element by name and value. The first argument is the
element name. The second argument is the argument value.
Methodsset-name->none(String)
The set-name method sets the xml element name.
get-name->String(none)
The get-name method returns the element name.
set-xval->none(String)
The set-xval method sets the xml element value.
get-xval->String(none)
The get-xval method returns the element value.
XmlEntity
The XmlEntity class is the base class for the xml entity representation. A xml entity can be either a
general entity or a parameter entity. They differ initially with the presence of the '%' character. Both
entity model have a name which is path of the base class.
Predicate
entity-p
Inheritance
XmlNode
Methodsset-name->none(String)
The set-name method sets the entity name.
get-name->String(none)
The get-name method returns the entity name.
XmlGe
The XmlGe class is the xml general entity node. In its simplest form, the general entity has a name and a
value. The entity type can also be associated with a system or a public identifier with or without an
extra type name.
Predicate
ge-p
Inheritance
XmlEntity
ConstructorsXmlGe(StringString)
The XmlGe constructor creates a xml entity by name and value. The first argument is the entity
name. The second argument is the entity value. Most of the time, the entity value is a parameter
entity.
XmlGe(StringStringString)
The XmlGe constructor creates a xml entity by name and identifier. The first argument is the
entity name. The second argument is the entity public identifier. The third argument is the entity
system identifier.
XmlGe(StringStringStringString)
The XmlGe constructor creates a xml entity by name, identifier and data type. The first argument
is the entity name. The second argument is the entity public identifier. the third argument is the
entity system identifier. The fourth argument is the entity type name.
Methodsget-xval->String(none)
The get-xval method returns the entity value.
get-data->String(none)
The get-data method returns the entity data type.
get-public-id->String(none)
The get-public-id method returns the entity public identifier.
get-system-id->String(none)
The get-system-id method returns the entity system identifier.
XmlPe
The XmlPe class is the xml parameter entity node. In its simplest form, the parameter entity has a name
and a value. The entity type can also be associated with a system or a public identifier.
Predicate
ge-p
Inheritance
XmlEntity
ConstructorsXmlPe(StringString)
The XmlGe constructor creates a xml entity by name and value. The first argument is the entity
name. The second argument is the entity value.
XmlPe(StringStringString)
The XmlGe constructor creates a xml entity by name and identifier. The first argument is the
entity name. The second argument is the entity public identifier. The third argument is the entity
system identifier.
Methodsget-xval->String(none)
The get-xval method returns the entity value.
get-public-id->String(none)
The get-public-id method returns the entity public identifier.
get-system-id->String(none)
The get-system-id method returns the entity system identifier.
XmlReader
The XmlReader class is the xml parser that operates on an input stream. The reader creates a tree of
nodes by reading the input stream and returns the root node when an end-of-stream is reached. Multiple
read can be done sequentially. If the reset method is not called between multiple read passes, the reader
will accumulate the nodes in the current tree.
Predicate
reader-p
Inheritance
Object
ConstructorsXmlReader(none)
The XmlReader constructor creates a default xml reader.
Methodsreset->none(none)
The reset method resets the xml reader. In particular, the root node is restored to the nil node.
parse->none(InputStream|String)
The parse method parses an input stream or a file. During the parsing process, the root node is
filled with the parsed nodes.
get-root->XmlRoot(none)
The get-root method returns the parsed root node.
get-node->XmlNode(String)
The get-node method parse a string and returns a node.
Xne
The Xne is a nameset that binds constants used by the xne system.
ConstantsID
The ID constant defines a node access by id.
PI
The PI constant defines an access selector for a processing instruction node.
GE
The GE constant defines an access selector for a general entity node.
TAG
The TAG constant defines an access selector for a tag node.
ENT
The ENT constant defines an access selector for an entity node.
EREF
The EREF constant defines an access selector for an entity reference node.
CREF
The CREF constant defines an access selector for an character reference node.
ELEM
The ELEM constant defines an access selector for an element node.
TEXT
The TEXT constant defines an access selector for a text node.
NAME
The NAME constant defines a node access by name.
CDATA
The CDATA constant defines an access selector for a character data node.
INDEX
The INDEX constant defines a node access by child index. The child index is node index seen from
the parent.
XneTree
The XneTree is the xne node tree manipulation class. The class operates with a node and provides numerous
methods to manipulate the tree as well as changing it. Before a tree is manipulated, it is recommended to
make a copy of such tree with the help of the node copy method.
Predicate
xne-tree-p
Inheritance
Object
ConstructorsXmlTree(none)
The XmlTree constructor creates a default tree without a node.
XmlTree(XmlNode)
The XmlTree constructor creates a tree with a xml node. The node stored in the object is the root
of the tree subject to the operations.
Methodsdepth->Integer(none)
The depth method returns the depth of the tree.
generate-id->Integer(none)
The generate-id method generate a unique id for all node in the tree. The id attribute is set by
this method.
set-node->none(XmlNode)
The set-node method sets the root tree node.
get-node->XmlNode(none)
The get-node method returns the root tree node.
set-attribute->none(none|String)
The set-attribute method sets an attribute to the whole tree. In the first form, the attribute is
set to the whole tree. In the second form with a string argument, the attribute is set only on the
tag node those name matches the name argument.
clear-attribute->none(none|String)
The clear-attribute method clear all attributes of the nodes in the tree. In the first form, the
node attributes are cleared for all nodes in the tree. In the second form with a string argument,
the attributes are cleared only with the tag node those name matches the name argument.
set-prefix->none(String)
The set-prefix method sets a prefix on all nodes in the tree.
clear-prefix->none(none)
The clear-prefix method clear the prefix for all nodes in the tree.
select->Vector(XneCond[Boolean])
The select method selects the node in the tree that matches the condition argument. In the first
form, with one argument, the whole tree is searched. In the second form, with a boolean argument,
the whole tree is searched if the second argument is false. If the boolean argument is true, the
method call behaves like a call with the condition only.
XneChild
The XneCond is the xne condition class. The sole purpose of this class is to define one or several
condition that a node must satisfy in order to be selected. The condition are accumulated in a list and
later checked for a particular node. Note that an empty condition always succeeds.
Predicate
xne-cond-p
Inheritance
Object
ConstructorsXneCond(none)
The XneCond constructor creates a default condition. The default condition is empty. The empty
condition always succeeds.
Methodsadd->none(Xne[String|Integer])
The add adds a condition by type. The first argument is the condition type. The second argument is
a condition information such like a string or an integer.
valid-p->Boolean(XmlNode)
The valid-p predicate checks that a node matches a condition. If the condition succeeds, the
predicate returns true.
XsmNode
The XsmNode is a base class which is part of the xml simple model (xsm). In this model, a xml (or sgml,
or html) text is represented by a node which can be either a tag, a text or a reference node. There is no
concept of tree. The node content is stored in the form of a text string. This simple model is designed
to parse weak data representation such like html text and later process it at the user discretion. The
default representation is an empty text node.
Predicate
xsm-node-p
Inheritance
Object
ConstantsTXT
The TXT constant defines a xsm text node.
TAG
The TAG constant defines a xsm tag node.
REF
The REF constant defines a xsm reference node.
END
The END constant defines a xsm end node.
ConstructorsXsmNode(none)
The XsmNode constructor creates a default xsm node which is an empty text node.
XsmNode(String)
The XsmNode constructor creates a xsm text node by value. The string argument is the text node
value
XsmNode(ItemString)
The XsmNode constructor creates a xsm text node by type and value. The first argument is the node
type. The second argument is the node text value.
Methodstext-p->Boolean(none)
The text-p predicate returns true if the node is a text node.
tag-p->Boolean(none)
The tag-p predicate returns true if the node is a tag node.
ref-p->Boolean(none)
The reference-p predicate returns true if the node is a reference node.
end-p->Boolean(none)
The end-p predicate returns true if the node is a reference node.
normal-p->Boolean(none)
The normal-p predicate returns true if the node is a normal tag node.
reserved-p->Boolean(none)
The reserved-p predicate returns true if the node is a reserved tag node.
textable-p->Boolean(none)
The textable-p predicate returns true if the node is a textable node, that is a text node or a
reference node.
get-source-line->Integer(none)
The get-source-line method returns the node source line number if any.
set-source-line->none(Integer)
The set-source-line method sets the node source line number.
get-source-name->String(none)
The get-source-name method returns the node source name if any.
set-source-name->none(String)
The set-source-name method sets the node source name.
get-name->String(none)
The get-name method returns the next available name. name.
XsmReader
The XmlReader class is the simple model node reader. The reader operates with the parse method and
returns a node or nil if the end of stream is reached. Unlike the xml reader, this reader does not build
a tree and the node content is not even parsed. In this model, the node content is to be interpreted at
the user discretion.
Predicate
xsm-reader-p
Inheritance
Object
ConstructorsXsmReader(none)
The XsmReader constructor creates a default xsm reader. The reader is not bound to any stream.
XsmReader(InputStream)
The XsmReader constructor creates a xsm reader with an input stream. The argument is the input
bound to the reader.
XsmReader(String)
The XsmReader constructor creates a xsm reader with an input string stream. The argument is a
string which is used to create an input string stream bound to the reader.
Methodsset-input-stream->none(InputStream)
The set-input-stream method bind a new input stream to the reader. Subsequent read will use the
newly bound stream
get-node->XsmNode(none)
The get-node method parses the input stream and returns the available node.
XsmDocument
The XsmDocument class is the document class that maintains a xsm document along with its associated list
of nodes and other useful information. Generally the class is constructed with a file name or a name and
an input stream that is used for parsing the input data. When the input stream has been parsed, the nodes
are stored in a vector which can be access by index.
Predicate
document-p
Inheritance
Nameable
ConstructorsXsmDocument(none)
The XsmDocument constructor creates a default xsm document.
XsmDocument(String)
The XsmDocument constructor creates a xsm document by name. The string argument is the file name
to parse.
XsmDocument(StringInputStream)
The XsmDocument constructor creates a xsm document by name and by parsing the input stream. The
first argument is the xsm document name. The second argument is the input stream to parse.
Methodsset-name->none(String)
The set-name method sets the xsm document name. The get-name method is available from the nameable
base class.
length->Integer(none)
The length method returns the xsm document length. The document length is the number of nodes
parsed and stored in the document.
get-node->XsmNode(Integer)
The get-node method returns a document node by index.
get-info->XsoInfo(Integer[Boolean])
The get-info method returns a node info object by index. The info object is evaluated dynamically
from the document node. In the first form, the node name is used to find the node end tag in order
to construct the info text value. In the second form, the boolean argument, if true, forces the
node name to be converted to lower case prior any comparison.
get-info-vector->XsoInfo(String[Boolean])
The get-info-vetcor method returns an info object vector by name. Each info object have their name
that matches the string argument. The info object is evaluated dynamically from the document node.
In the first form, the node name is used to match a tag node and then find the node end tag in
order to construct the info text value. In the second form, the boolean argument, if true, forces
the node name to be converted to lower case prior any comparison.
XsoInfo
The XsoInfo class is a xml/xsm information node used to carry simple information about a tag. The node is
constructed by name, with a set of attributes and eventually a text associated with the node. The text
information is generally the one associated between the start tag and the end tag. In the case of complex
tree, such text data might be empty.
Predicate
xso-info-p
Inheritance
Nameable
ConstructorsXsoInfo(none)
The XsoInfo constructor creates a default info object.
XsoInfo(String)
The XsoInfo constructor creates an info object by name. The string argument is the node info name.
XsoInfo(StringString)
The XsoInfo constructor creates an info object by name and text. The first argument is the node
info name. The second argument is the node text information.
Methodsset-name->none(String)
The set-name method sets the info object name.
set-attribute->none(StringLiteral)
The set-attribute method sets an attribute by name and value. The first argument is the attribute
name. The second argument is the attribute value.
get-attribute-list->Plist(none)
The get-attribute-list method returns the node attribute list in the form of a property list
object.
get-attribute-value->String(String)
The get-attribute-value method returns the attribute value by name. The string argument is the
attribute name.
set-text->none(String)
The set-text method sets the info object text.
get-text->String(none)
The get-text method returns the text information.
AFNIX Module AFNIX xml(3)