iTP Active Transaction Pages (iTP ATP) Programmer's Guide
XML for ATP Add-On Module
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide—522292-002
5-55
XMLDOMDocumentFragment Object
XMLDOMDocumentFragment Object
XMLDOMDocumentFragment is a minimal DOMDocument Object that enables free-
insert operations. Using this object, you can extract a portion of a document’s tree or
create a new fragment of a document, and use a node for this purpose. Depending on
your implementation, using the XMLDOMDocumentFragment is more simple than
using a potentially unwieldy DOMDocument Object
.
Various operations, such as inserting nodes as children of another node, can take
XMLDOMDocumentFragment objects as arguments, resulting in all the child nodes of
the XMLDOMDocumentFragment being moved to the child list of the other node.
The children of an XMLDOMDocumentFragment node are zero or more nodes
representing the tops of any subtrees that define the structure of the document.
XMLDOMDocumentFragment nodes do not need to be well-formed XML documents
(although they do need to follow the rules imposed upon well-formed XML parsed
entities, which can have multiple top nodes). For example, an
XMLDOMDocumentFragment might have only one child and that child node could be a
text node. Such a structure model represents neither an HTML document nor a well-
formed XML document.
When an XMLDOMDocumentFragment is inserted into a document or into a node that
can take children, the children of the XMLDOMDocumentFragment (not the
XMLDOMDocumentFragment itself) are inserted into the node.
This helps you to create nodes that are siblings; the XMLDOMDocumentFragment acts
as the parent of these nodes so that you can use the standard methods from the node
interface, such as insertBefore and appendChild.
XMLDOMDocumentFragment has no unique properties or methods of its own, but
exposes the same objects and properties as the XMLDOMNode Object
.
XMLDOMDocumentType Object
The XMLDOMDocumentType object provides access to the list of entities and notations
that are defined for the document. This object contains information associated with the
document type declaration. Each DOMDocument Object has a doctype whose value is
either null or an XMLDOMDocumentType object. Table 5-16 specifies the common
properties of the XMLDOMDocumentType object.
Table 5-16. XMLDOMDocumentType Object Properties
Property Description
name Contains the name of DTD, the name immediately following
the DOCTYPE keyword in an XML source document.
entities Is an XMLDOMNamedNodeMap Object containing the
general entities, both external and internal, declared in the
DTD.
notations Is an XMLDOMNamedNodeMap Object containing an entry
for each notation declared in a document’s DTD.