-
Notifications
You must be signed in to change notification settings - Fork 1
serializer.xml dom stream
load serializer.xml-dom-stream
This module provides the Serializer.XmlDomStream class which allow to read and write XML documents with a DOM algorithm.
This enum describes the error codes of DOM exceptions.
| Constant | Value | Description |
|---|---|---|
| ABORT_ERR | 20 |
|
| DATA_CLONE_ERR | 25 |
|
| DOMSTRING_SIZE_ERR | 2 |
|
| HIERARCHY_REQUEST_ERR | 3 |
|
| INDEX_SIZE_ERR | 1 |
|
| INUSE_ATTRIBUTE_ERR | 10 |
|
| INVALID_ACCESS_ERR | 15 |
|
| INVALID_CHARACTER_ERR | 5 |
|
| INVALID_MODIFICATION_ERR | 13 |
|
| INVALID_NODE_TYPE_ERR | 24 |
|
| INVALID_STATE_ERR | 11 |
|
| NAMESPACE_ERR | 14 |
|
| NETWORK_ERR | 19 |
|
| NOT_FOUND_ERR | 8 |
|
| NOT_SUPPORTED_ERR | 9 |
|
| NO_DATA_ALLOWED_ERR | 6 |
|
| NO_MODIFICATION_ALLOWED_ERR | 7 |
|
| QUOTA_EXCEEDED_ERR | 22 |
|
| SECURITY_ERR | 18 |
|
| SYNTAX_ERR | 12 |
|
| TIMEOUT_ERR | 23 |
|
| TYPE_MISMATCH_ERR | 17 |
|
| URL_MISMATCH_ERR | 21 |
|
| VALIDATION_ERR | 16 |
|
| WRONG_DOCUMENT_ERR | 4 |
This class represents one attribute in the DOM tree.
| Modifiers | Member | Description |
|---|---|---|
override const
|
cloneNode | Returns a copy of this node. If deep is true, the copy also includes the node... |
const |
getLocalName | Returns the local name of the attribute. |
const |
getNamespaceUri | Returns the namespace URI of the attribute. |
override const
|
getNodeValue | Returns the node's meaningfull value. |
const |
getOwnerElement | Returns the owner element of the attribute. |
const |
getPrefix | Returns the prefix (namespace) of the attribute. |
const |
getQualifiedName | Returns the qualified name of the attribute (prefix + name). |
override const
|
getTextContent | Returns the node's text content by concatenating its meaningfull value with t... |
const |
getValue | Returns the value of the attribute. |
const |
new | Creates a new attribute from Serializer.XmlDomAttribute.Serializer.XmlAttribute ``... |
const |
toString | Returns the string representation of the attribute. |
| Modifiers | Member | Description |
|---|---|---|
final |
attribute |
This class represents an XML CDATA section.
CDATA sections are used to escape blocks of text containing characters that
would otherwise be regarded as markup. The only delimiter that is recognized
in a CDATA section is the ]]> string that terminates the CDATA section.
CDATA sections cannot be nested. Their primary purpose is for including material such as XML fragments, without needing to escape all the delimiters.
| Modifiers | Member | Description |
|---|---|---|
const |
toString | Returns the string representation of the CDATA node. |
This class represents abstract character data in the parsed XML document.
| Modifiers | Member | Description |
|---|---|---|
override const
|
== | Returns true if other is equal to self; otherwise returns false. |
const |
appendData | Appends the string data to the stored string. |
const |
deleteData | Deletes a substring of length count from position offset. An instance of Seri... |
const |
getData | Returns the content of the text node. |
override const
|
getNodeValue | Returns the node's meaningfull value. |
override const
|
getTextContent | Returns the node's text content by concatenating its meaningfull value with t... |
const |
insertData | Inserts the string data into the stored string at position offset. An instanc... |
const |
length | Returns the length of the data. |
const |
new | Creates a new character node for the characters given by data. |
const |
replaceData | Replaces the substring of length count starting at position offset with the s... |
const |
setData | Sets the content of the text node. |
const |
size | Returns the length of the data. |
const |
substringData | Returns the substring of length count from position offset. An instance of Se... |
| Modifiers | Member | Description |
|---|---|---|
final |
data | Internal content data. |
This class represents comment data in the parsed XML document.
| Modifiers | Member | Description |
|---|---|---|
override const
|
cloneNode | Returns a copy of this node. If deep is true, the copy also includes the node... |
const |
toString | Returns the string representation of the comment node. |
This class represents the entire XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
| Modifiers | Member | Description |
|---|---|---|
const |
adoptNode | Moves node from another document and returns it. An instance of Serializer.Xm... |
override const
|
cloneNode | Returns a copy of this node. If deep is true, the copy also includes the node... |
const |
createAttribute | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomAttribute... |
const |
createAttributeNS | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomAttribute... |
const |
createCDATASection | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomCData wi... |
const |
createComment | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomComment ... |
const |
createDocumentFragment | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomDocument... |
const |
createElement | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomElement ... |
const |
createElementNS | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomElement ... |
const |
createProcessingInstruction | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomProcessi... |
const |
createTextNode | Creates a new instance of Serializer.XmlDomDocument.Serializer.XmlDomText wit... |
const |
getDoctype | Returns the document type of this document. |
const |
getDocumentElement | Returns the root element of the document. |
const |
getElementById | Returns the first element within node’s descendants whose ID is elementId or ``... |
const |
getElementsByClassName | Returns an iterator on each descendants elements of this node with all their ... |
const |
getElementsByTagName | Returns an iterator on each top level child Serializer.XmlDomDocument.Seriali... |
const |
getElementsByTagNameNS | Returns an iterator on each top level child Serializer.XmlDomDocument.Seriali... |
const |
getProcessingInstructions | Returns an iterator on each top level Serializer.XmlDomDocument.Serializer.Xm... |
const |
importNode | Returns a copy of node. If deep is true, the copy also includes the node’s ... |
const |
toString | Returns the string representation of the document. |
This class represents a fragment of the DOM tree.
| Modifiers | Member | Description |
|---|---|---|
const |
getElementById | Returns the first element within node’s descendants whose ID is elementId or ``... |
override const
|
getTextContent | Returns the node's text content by concatenating its meaningfull value with t... |
const |
toString | Returns the string representation of the document fragment. |
This class is the representation of the DTD in the document tree.
| Modifiers | Member | Description |
|---|---|---|
override const
|
== | Returns true if other is equal to self; otherwise returns false. |
override const
|
cloneNode | Returns a copy of this node. If deep is true, the copy also includes the node... |
const |
new | Creates a new DTD node for the text given by content. |
const |
toString | Returns the string representation of the DTD node. |
| Modifiers | Member | Description |
|---|---|---|
final |
content | Internal content data. |
This class represents one element in the DOM tree. An element have a tag name and zero or more attributes. It can also contains children nodes.
| Modifiers | Member | Description |
|---|---|---|
override const
|
== | Returns true if other is equal to self; otherwise returns false. |
override const
|
cloneNode | Returns a copy of this node. If deep is true, the copy also includes the node... |
const |
getAttribute | Returns the attribute with the given qualifiedName. |
const |
getAttributeNS | Returns the attribute with the given namespaceUri and localName. |
const |
getAttributeNames | Returns an iterator on each element's attribute's qualified name. |
const |
getAttributeNode | Returns the first attribute with the given qualifiedName; otherwise null. |
const |
getAttributeNodeNS | Returns the first attribute with the givens namespaceUri and localName; other... |
const |
getAttributes | Returns an instance of Serializer.XmlDomElement.Serializer.XmlAttributes cont... |
const |
getClassList | Returns an array containing the list of values in the class attribute of the ... |
const |
getClassName | Returns the value of the class attribute of the element or none if the elemen... |
const |
getElementsByClassName | Returns an iterator on each descendants elements of this node with all their ... |
const |
getElementsByTagName | Returns an iterator on each direct child Serializer.XmlDomElement.Serializer.... |
const |
getElementsByTagNameNS | Returns an iterator on each direct child Serializer.XmlDomElement.Serializer.... |
const |
getId | Returns the value of the id attribute of the element or none if the element h... |
const |
getLocalName | Returns the name of the tag. |
const |
getNamespaceUri | Returns the namespace URI of the tag. |
const |
getPrefix | Returns the prefix (namespace) of the tag. |
const |
getSlot | Returns the value of the slot attribute of the element or none if the element... |
const |
getTagName | Returns the qualified name of the tag (prefix + name). |
override const
|
getTextContent | Returns the node's text content by concatenating its meaningfull value with t... |
const |
hasAttribute | Returns true if this element has an attribute with the given qualifiedName; o... |
const |
hasAttributeNS | Returns true if this element has an attribute with the given namespaceUri and ``... |
const |
hasAttributes | Returns true if the element has attributes; otherwise false. |
const |
new | Creates a new element with the given qualifiedName. |
const |
removeAttribute | Removes the attribute with the given qualifiedName from this element. |
const |
removeAttributeNS | Removes the attribute with the given namespaceUri and localName from this ele... |
const |
removeAttributeNode | Removes the attribute attr from the list and returns it. The list must contai... |
const |
removeAttributeNodeNS | Removes the attribute attr from the list and returns it. The list must contai... |
const |
setAttribute | Sets the value of the attribute with the given qualifiedName to value. If no ... |
const |
setAttributeNS | Sets the value of the attribute with the given namespaceUri and qualifiedName... |
const |
setAttributeNode | Sets the attribute attr into the list. If an attribute with the same qualifie... |
const |
setAttributeNodeNS | Sets the attribute attr into the list. If an attribute with the same namespac... |
const |
toString | Returns the string representation of the element. |
const |
toggleAttribute | Toggles the attribute with the given qualifiedName`, removing it if it |
| is present and adding it if`... |
| Modifiers | Member | Description |
|---|---|---|
final |
attributes | Internal attributes list. |
final |
localName | Internal tag name. |
final |
namespaceUri | Internal tag namespace URI. |
final |
qualifiedName | Internal tag qualified name. |
This class provides the context of a DOM exception.
| Modifiers | Member | Description |
|---|---|---|
enum |
Code | This enum describes the error codes of DOM exceptions. |
@ const
|
Messages | This hash provides the messages associated to the values of Serializer.XmlDom... |
@ const
|
Names | This hash provides the names associated to the values of Serializer.XmlDomExc... |
const |
getCode | Returns the code of the exception or none if there is no code. |
const |
getMessage | Returns the message of the exception. |
const |
getName | Returns the name of the exception. |
const |
new | Creates a new exception context. The message is found in the Serializer.XmlDo... |
const |
toString | Returns the exception informations as a string. |
| Modifiers | Member | Description |
|---|---|---|
final |
code | Internal exception code. |
final |
message | Internal exception message. |
final |
name | Internal exception name. |
This class represents an attribute list in the DOM tree.
| Modifiers | Member | Description |
|---|---|---|
const |
!= | Returns true if other is not equal to this list of attributes; otherwise retu... |
const |
== | Returns true if other is equal to this list of attributes; otherwise returns ``... |
const |
contains | Returns true if the list contains an attribute with the given qualifiedName; ... |
const |
containsNS | Returns true if the list contains an attribute with the givens namespaceUri and ``... |
const |
getNamedItem | Returns the first attribute with the given qualifiedName; otherwise null. |
const |
getNamedItemNS | Returns the first attribute with the givens namespaceUri and localName; other... |
const |
in | Returns true if the list contains an attribute with the given qualifiedName; ... |
const |
indexOf | Returns the index position of the first attribute with the given qualifiedName... |
const |
indexOfNS | Returns the index position of the first attribute with the givens namespaceUri... |
const |
isEmpty | Returns true if the list is empty; otherwise returns false. |
const |
item | Returns the attribute at the given index in the list or null if no attribute ... |
const |
length | Returns the number of attributes in the list. |
const |
new | Creates a new attribute list. |
const |
removeNamedItem | Removes the first attribute with the given qualifiedName. |
const |
removeNamedItemNS | Removes the first attribute with the givens namespaceUri and localName. |
const |
setNamedItem | Sets the attribute attr into the list. If an attribute with the same qualifie... |
const |
setNamedItemNS | Sets the attribute attr into the list. If an attribute with the same namespac... |
const |
size | Returns the number of attributes in the list. |
const |
toString | Returns the string representation of the attribute list. |
| Modifiers | Member | Description |
|---|---|---|
final |
attributes | Internal attributes. |
This class represents abstract node in the parsed XML document.
| Modifiers | Member | Description |
|---|---|---|
const |
!= | Returns false if other is equal to self; otherwise returns true. |
const |
== | Returns true if other is equal to self; otherwise returns false. |
const |
appendChild | Appends node at the end of this node. An instance of Serializer.XmlDomNode.Se... |
const |
cloneNode | Returns a copy of this node. If deep is true, the copy also includes the node... |
const |
contains | |
const |
getChildNodes | Returns an array containing the children nodes of this node. |
const |
getFirstChild | Returns the first child of this node of this node or null id the node has no ... |
const |
getLastChild | Returns the last child of this node of this node or null id the node has no c... |
const |
getNextSibling | Returns the next sibling in the document tree or null. |
const |
getNodeValue | Returns the node's meaningfull value. |
const |
getOwnerDocument | Returns the document to which this node belongs. |
const |
getParentNode | Returns the parent node. If this node has no parent, null is returned. |
const |
getPreviousSibling | Returns the previous sibling in the document tree or null. |
const |
getRootNode | Returns the root node of this node. If composed is true, the root node may be... |
const |
getTextContent | Returns the node's text content by concatenating its meaningfull value with t... |
const |
hasChildNodes | Returns true if the node has childrens; otherwise returns false. |
const |
in | Returns true if this node contains node; otherwise returns false. |
const |
insert | Inserts the node node at the index given by index. If index is negative, the ... |
const |
insertBefore | Inserts node before child in this node. If child is none, the is inserted as ... |
const |
isEqualNode | Returns true is self and other are equals nodes (i.e self and other have the ... |
const |
isSameNode | Returns true is self and other are the same node (i.e self is other); otherwi... |
const |
normalize | Removes empty exclusive Text nodes and concatenates the data of remaining con... |
const |
parentElement | Returns the parent node if it is an instance of Serializer.XmlDomNode.Seriali... |
const |
remove | Removes the node at the given index from this node. An instance of Serializer... |
const |
removeChild | Removes node from this node. An instance of Serializer.XmlDomNode.Serializer.... |
const |
replace | Replaces the node at the given index with node in this node. An instance of S... |
const |
replaceChild | Replaces the child node with node in this node. An instance of Serializer.Xml... |
| Modifiers | Member | Description |
|---|---|---|
final |
children | Internal child node list. |
final |
document | Internal document node. |
const |
findRecursive | Returns the fisrt node where predicate returns true for the node. The nodes a... |
final |
parent | Internal parent node. |
This class represents an XML processing instruction. A processing instruction have a target name and one or more ettributes.
| Modifiers | Member | Description |
|---|---|---|
override const
|
== | Returns true if other is equal to self; otherwise returns false. |
override const
|
cloneNode | Returns a copy of this node. If deep is true, the copy also includes the node... |
const |
getAttribute | Returns the attribute with the given qualifiedName. |
const |
getAttributes | Returns an instance of Serializer.XmlDomProcessingInstruction.Serializer.XmlA... |
const |
getTarget | Returns the target name of the processing instruction. |
const |
hasAttribute | Returns true if this element has an attribute with the given qualifiedName; o... |
const |
new | Creates a new processing instruction with the given name target name and data... |
const |
removeAttribute | Removes the attribute with the given qualifiedName from this element. |
const |
setAttribute | Sets the value of the attribute with the given qualifiedName to value. If no ... |
const |
setTarget | Sets the target name of the processing instruction. |
const |
toString | Returns the string representation of the processing instruction. |
| Modifiers | Member | Description |
|---|---|---|
final |
attributes | Internal attributes list. |
final |
target | Internal target name. |
This class class provides a way to read and write XML documents using a DOM algorithm.
| Modifiers | Member | Description |
|---|---|---|
const |
new | Creates a new stream for reading and writing data using stream. |
override const
|
read | Reads the content of the stream and return it as an instance of Serializer.Xm... |
override const
|
write | Writes the XML described by data to the stream. The XML will be adapted to ma... |
| Modifiers | Member | Description |
|---|---|---|
class |
Context | This class provides the parsing context to convert XML into nodes. |
final |
context | Internal context object. |
This class provides the parsing context to convert XML into nodes.
| Modifiers | Member | Description |
|---|---|---|
final |
currentElement | Current element. |
final |
document | Current document node. |
final |
documentType | Document's type definition. |
const |
new | Creates a new parsing context. |
const |
onCData | Creates a new Serializer.XmlDomStream.Context.Serializer.XmlDomCData node int... |
const |
onCharacters | Creates a new Serializer.XmlDomStream.Context.Serializer.XmlDomCharacterData ... |
const |
onComment | Creates a new Serializer.XmlDomStream.Context.Serializer.XmlDomComment node i... |
const |
onDtd | Creates a new Serializer.XmlDomStream.Context.Serializer.XmlDomDtd node into ... |
const |
onEndDocument | Finalize the Serializer.XmlDomStream.Context.Serializer.XmlDomDocument node o... |
const |
onEndElement | Finalize the last pushed Serializer.XmlDomStream.Context.Serializer.XmlDomEle... |
const |
onProcessingInstruction | Creates a new Serializer.XmlDomStream.Context.Serializer.XmlDomProcessingInst... |
const |
onStartDocument | Creates a new Serializer.XmlDomStream.Context.Serializer.XmlDomDocument node ... |
const |
onStartElement | Creates a new Serializer.XmlDomStream.Context.Serializer.XmlDomElement node a... |
final |
parentElements | Parent elements stack. |
final |
rootElement | Document's root element. |
| Modifiers | Member | Description |
|---|---|---|
final const
|
currentParent | Returns the stack's top parent element if any or the document root node. |
final |
stream | Internal stream object. |
This class represents text data in the parsed XML document.
| Modifiers | Member | Description |
|---|---|---|
override const
|
cloneNode | Returns a copy of this node. If deep is true, the copy also includes the node... |
const |
splitText | Splits data at the given offset and returns the remainder as Serializer.XmlDo... |
const |
toString | Returns the string representation of the text node. |
const |
wholeText | Returns the combined data of all direct Serializer.XmlDomText.Serializer.XmlD... |
null
def (self, deep = false)
Returns a copy of this node. If deep is true, the copy also includes
the node’s descendants.
def (const self)
Returns the local name of the attribute.
def (const self)
Returns the namespace URI of the attribute.
def (const self)
Returns the node's meaningfull value.
def (const self)
Returns the owner element of the attribute.
def (const self)
Returns the prefix (namespace) of the attribute.
def (const self)
Returns the qualified name of the attribute (prefix + name).
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
def (const self)
Returns the value of the attribute.
def (self, attribute)
Creates a new attribute from Serializer.XmlAttribute attribute.
def (self, qualifiedName, value)
Creates a new attribute with the given qualifiedName and value.
def (self, namespaceUri, qualifiedName, value)
Creates a new attribute with the given namespaceUri, qualifiedName
and value.
def (const self)
Returns the string representation of the attribute.
def (const self)
Returns the string representation of the CDATA node.
def (const self, const other)
Returns true if other is equal to self; otherwise returns false.
def (self, data)
Appends the string data to the stored string.
''
Internal content data.
def (self, offset, count)
Deletes a substring of length count from position offset.
An instance of Serializer.XmlDomException is raised on error.
def (const self)
Returns the content of the text node.
def (const self)
Returns the node's meaningfull value.
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
def (self, offset, data)
Inserts the string data into the stored string at position offset.
An instance of Serializer.XmlDomException is raised on error.
def (const self)
Returns the length of the data.
def (self, data)
Creates a new character node for the characters given by data.
def (self, offset, count, data)
Replaces the substring of length count starting at position offset
with the string data.
An instance of Serializer.XmlDomException is raised on error.
def (self, content)
Sets the content of the text node.
def (const self)
Returns the length of the data.
def (const self, offset, count)
Returns the substring of length count from position offset.
An instance of Serializer.XmlDomException is raised on error.
def (self, deep = false)
Returns a copy of this node. If deep is true, the copy also includes
the node’s descendants.
def (const self)
Returns the string representation of the comment node.
def (self, node)
Moves node from another document and returns it.
An instance of Serializer.XmlDomException is raised on error.
def (self, deep = false)
Returns a copy of this node. If deep is true, the copy also includes
the node’s descendants.
def (self, qualifiedName)
Creates a new instance of Serializer.XmlDomAttribute with the given
qualifiedlName for this document.
def (self, namespaceUri, qualifiedName)
Creates a new instance of Serializer.XmlDomAttribute with the givens
namespaceUri and qualifiedlName for this document.
def (self, data)
Creates a new instance of Serializer.XmlDomCData with the given data
for this document.
def (self, data)
Creates a new instance of Serializer.XmlDomComment with the given data
for this document.
def (self)
Creates a new instance of Serializer.XmlDomDocument for this document.
def (self, qualifiedlName, attributes = Serializer.XmlAttributes ())
Creates a new instance of Serializer.XmlDomElement with the givens
qualifiedlName and attributes for this document.
def (self, namespaceUri, qualifiedName, attributes = Serializer.XmlAttributes ())
Creates a new instance of Serializer.XmlDomElement with the givens
namespaceUri, qualifiedlName and attributes for this document.
def (self, target, data)
Creates a new instance of Serializer.XmlDomProcessingInstruction with
the givens target and data for this document.
def (self, data)
Creates a new instance of Serializer.XmlDomText with the given data
for this document.
def (const self)
Returns the document type of this document.
def (const self)
Returns the root element of the document.
def (const self, elementId)
Returns the first element within node’s descendants whose ID is
elementId or null if no matching element can be found.
def (const self, classNames)
Returns an iterator on each descendants elements of this node with all
their classes contained in classNames. The classNames parameter can
either be an array of names or a string containing each names separated
with white spaces.
def (const self, qualifiedName)
Returns an iterator on each top level child Serializer.XmlDomElement
with a name that match qualifiedName.
def (const self, namespaceUri, localName)
Returns an iterator on each top level child Serializer.XmlDomElement
with a name that match namespaceUri and localName.
def (const self)
Returns an iterator on each top level Serializer.XmlDomProcessingInstruction of the document.
def (self, node, deep = false)
Returns a copy of node. If deep is true, the copy also includes the
node’s descendants.
An instance of Serializer.XmlDomException is raised on error.
def (const self)
Returns the string representation of the document.
def (const self, elementId)
Returns the first element within node’s descendants whose ID is
elementId or null if no matching element can be found.
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
def (const self)
Returns the string representation of the document fragment.
def (const self, const other)
Returns true if other is equal to self; otherwise returns false.
def (self, deep = false)
Returns a copy of this node. If deep is true, the copy also includes
the node’s descendants.
''
Internal content data.
def (self, content)
Creates a new DTD node for the text given by content.
def (const self)
Returns the string representation of the DTD node.
def (const self, const other)
Returns true if other is equal to self; otherwise returns false.
null
Internal attributes list.
def (self, deep = false)
Returns a copy of this node. If deep is true, the copy also includes
the node’s descendants.
def (const self, qualifiedName)
Returns the attribute with the given qualifiedName.
def (const self, namespaceUri, localName)
Returns the attribute with the given namespaceUri and localName.
def (const self)
Returns an iterator on each element's attribute's qualified name.
def (const self, qualifiedName)
Returns the first attribute with the given qualifiedName; otherwise
null.
def (const self, namespaceUri, localName)
Returns the first attribute with the givens namespaceUri and
localName; otherwise null.
def (const self)
Returns an instance of Serializer.XmlAttributes containing each attributes of the element.
def (const self)
Returns an array containing the list of values in the class attribute
of the element or an empty list if the element has no class name.
def (const self)
Returns the value of the class attribute of the element or none if
the element has no class name.
def (const self, classNames)
Returns an iterator on each descendants elements of this node with all
their classes contained in classNames. The classNames parameter can
either be an array of names or a string containing each names separated
with white spaces.
def (const self, qualifiedName)
Returns an iterator on each direct child Serializer.XmlDomElement with
a name that match qualifiedName.
def (const self, namespaceUri, localName)
Returns an iterator on each direct child Serializer.XmlDomElement with
a name that match namespaceUri and localName.
def (const self)
Returns the value of the id attribute of the element or none if the
element has no ID.
def (const self)
Returns the name of the tag.
def (const self)
Returns the namespace URI of the tag.
def (const self)
Returns the prefix (namespace) of the tag.
def (const self)
Returns the value of the slot attribute of the element or none if
the element has no class slot.
def (const self)
Returns the qualified name of the tag (prefix + name).
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
def (const self, qualifiedName)
Returns true if this element has an attribute with the given
qualifiedName; otherwise returns false.
def (const self, namespaceUri, localName)
Returns true if this element has an attribute with the given
namespaceUri and localName; otherwise returns false.
def (const self)
Returns true if the element has attributes; otherwise false.
''
Internal tag name.
''
Internal tag namespace URI.
def (self, qualifiedName)
Creates a new element with the given qualifiedName.
def (self, namespaceUri, qualifiedName)
Creates a new element with the given namespaceUri and qualifiedName.
''
Internal tag qualified name.
def (self, qualifiedName)
Removes the attribute with the given qualifiedName from this element.
def (self, namespaceUri, localName)
Removes the attribute with the given namespaceUri and localName from this element.
def (self, attr)
Removes the attribute attr from the list and returns it. The list must
contains an attribute with the same qualified name.
def (self, attr)
Removes the attribute attr from the list and returns it. The list must
contains an attribute with the same namespace URI and local name.
def (self, qualifiedName, value)
Sets the value of the attribute with the given qualifiedName to value.
If no attribute was found, a new attribute is created at the end of the
list.
def (self, namespaceUri, qualifiedName, value)
Sets the value of the attribute with the given namespaceUri and
qualifiedName to value. If no attribute was found, a new attribute
is created at the end of the list.
def (self, attr)
Sets the attribute attr into the list. If an attribute with the same
qualified name is found in the list, the attribute is replaced with the
new value and the previous instance is returned; otherwise the node is
inserted at the end of the list and null is returned.
def (self, attr)
Sets the attribute attr into the list. If an attribute with the same
namespace URI and local name is found in the list, the attribute is
replaced with the new value and the previous instance is returned;
otherwise the node is inserted at the end of the list and null is
returned.
def (const self)
Returns the string representation of the element.
def (self, qualifiedName)
Toggles the attribute with the given qualifiedName`, removing it if it is present and adding it if it is not present.
erwise false. `
def (self, qualifiedName, force)
If force is true, adds an attribute with the given qualifiedName. forceisfalse, removes the attribute with the given qualifiedName.
Returns true if the attribute is now present; otherwise false.
20
25
2
3
1
10
15
5
13
24
11
14
19
8
9
6
7
22
18
12
23
17
21
16
4
none
This hash provides the messages associated to the values of Serializer.XmlDomException.Code.
none
This hash provides the names associated to the values of Serializer.XmlDomException.Code.
none
Internal exception code.
def (const self)
Returns the code of the exception or none if there is no code.
def (const self)
Returns the message of the exception.
def (const self)
Returns the name of the exception.
''
Internal exception message.
''
Internal exception name.
def (self, code)
Creates a new exception context. The message is found in the
Serializer.XmlDomException.Messages hash and the name is found in the
Serializer.XmlDomException.Names hash using code.
def (self, name, message)
Creates a new exception context.
def (self, code, name, message)
Creates a new exception context.
def (const self)
Returns the exception informations as a string.
def (const self, const other)
Returns true if other is not equal to this list of attributes; otherwise
returns false.
Two lists are considered equal if they contain the same attributes in the same order.
def (const self, const other)
Returns true if other is equal to this list of attributes; otherwise
returns false.
Two lists are considered equal if they contain the same attributes in the same order.
[]
Internal attributes.
def (const self, const qualifiedName)
Returns true if the list contains an attribute with the given
qualifiedName; otherwise returns false.
def (const self, namespaceUri, const localName)
Returns true if the list contains an attribute with the givens
namespaceUri and localName; otherwise returns false.
def (const self, const qualifiedName)
Returns the first attribute with the given qualifiedName; otherwise
null.
def (const self, namespaceUri, const localName)
Returns the first attribute with the givens namespaceUri and
localName; otherwise null.
def (const self, const qualifiedName)
Returns true if the list contains an attribute with the given
qualifiedName; otherwise returns false.
def (const self)
Returns an iterator on each attribute of the list.
def (const self, const qualifiedName)
Returns the index position of the first attribute with the given
qualifiedName. Returns none if no element matched.
def (const self, const namespaceUri, const localName)
Returns the index position of the first attribute with the givens
namespaceUri and localName. Returns none if no element matched.
def (const self)
Returns true if the list is empty; otherwise returns false.
def (const self, index)
Returns the attribute at the given index in the list or null if no
attribute can be found.
def (const self)
Returns the number of attributes in the list.
def (self)
Creates a new attribute list.
def (self, const qualifiedName)
Removes the first attribute with the given qualifiedName.
def (self, const namespaceUri, const localName)
Removes the first attribute with the givens namespaceUri and
localName.
def (self, attr)
Sets the attribute attr into the list. If an attribute with the same
qualified name is found in the list, the attribute is replaced with the
new value and the previous instance is returned; otherwise the node is
inserted at the end of the list and null is returned.
def (self, attr)
Sets the attribute attr into the list. If an attribute with the same
namespace URI and local name is found in the list, the attribute is
replaced with the new value and the previous instance is returned;
otherwise the node is inserted at the end of the list and null is
returned.
def (const self)
Returns the number of attributes in the list.
def (const self)
Returns the string representation of the attribute list.
def (const self, const other)
Returns false if other is equal to self; otherwise returns true.
def (const self, const other)
Returns true if other is equal to self; otherwise returns false.
def (self, node)
Appends node at the end of this node.
An instance of Serializer.XmlDomException is raised on error.
[]
Internal child node list.
def (self, deep = false)
Returns a copy of this node. If deep is true, the copy also includes
the node’s descendants.
def (const self, const other)
null
Internal document node.
def (const self, predicate)
Returns the fisrt node where predicate returns true for the node. The
nodes are searched recursively in this node's children. If no matching
node can be found none is returned.
def (const self)
Returns an array containing the children nodes of this node.
def (const self)
Returns the first child of this node of this node or null id the node
has no children.
def (const self)
Returns the last child of this node of this node or null id the node
has no children.
def (const self)
Returns the next sibling in the document tree or null.
def (const self)
Returns the node's meaningfull value.
def (const self)
Returns the document to which this node belongs.
def (const self)
Returns the parent node. If this node has no parent, null is returned.
def (const self)
Returns the previous sibling in the document tree or null.
def (composed = false)
Returns the root node of this node. If composed is true, the root node
may be the first instance of Serializer.XmlDomDocumentFragment containing
the node; otherwise the root node is the first node whose parent is null.
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
def (const self)
Returns true if the node has childrens; otherwise returns false.
def (const self, const node)
Returns true if this node contains node; otherwise returns
false.
def (const self)
Returns an iterator on each direct children nodes of this node.
def (self, index, node)
Inserts the node node at the index given by index. If index is
negative, the position is relative to the end of this node.
An instance of Serializer.XmlDomException is raised on error.
def (self, node, child = none)
Inserts node before child in this node. If child is none, the
is inserted as the first child element.
An instance of Serializer.XmlDomException is raised on error.
def (const self, const other)
Returns true is self and other are equals nodes (i.e self and
other have the same properties); otherwise returns false.
def (const self, const other)
Returns true is self and other are the same node (i.e self is
other); otherwise returns false.
def (self)
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
null
Internal parent node.
def (const self)
Returns the parent node if it is an instance of Serializer.XmlDomElement;
otherwise returns null.
def (self, index)
Removes the node at the given index from this node.
An instance of Serializer.XmlDomException is raised on error.
def (self, node)
Removes node from this node.
An instance of Serializer.XmlDomException is raised on error.
def (self, index, node)
Replaces the node at the given index with node in this node.
An instance of Serializer.XmlDomException is raised on error.
def (self, node, child)
Replaces the child node with node in this node.
An instance of Serializer.XmlDomException is raised on error.
def (const self, const other)
Returns true if other is equal to self; otherwise returns false.
none
Internal attributes list.
def (self, deep = false)
Returns a copy of this node. If deep is true, the copy also includes
the node’s descendants.
def (const self, qualifiedName)
Returns the attribute with the given qualifiedName.
def (const self)
Returns an instance of Serializer.XmlAttributes containing each
attributes of the processing instruction data or none if the data is
not an attribute list.
def (const self)
Returns the target name of the processing instruction.
def (const self, qualifiedName)
Returns true if this element has an attribute with the given
qualifiedName; otherwise returns false.
def (self, target, data)
Creates a new processing instruction with the given name target name
and data attribute list.
def (self, qualifiedName)
Removes the attribute with the given qualifiedName from this element.
def (self, qualifiedName, value)
Sets the value of the attribute with the given qualifiedName to value.
If no attribute was found, a new attribute is created at the end of the
list.
def (self, target)
Sets the target name of the processing instruction.
''
Internal target name.
def (const self)
Returns the string representation of the processing instruction.
none
Current element.
def (const self)
Returns the stack's top parent element if any or the document root node.
none
Current document node.
none
Document's type definition.
def (self, stream)
Creates a new parsing context.
def (self, content)
Creates a new Serializer.XmlDomCData node into the context. If the node was not correctly inserted into the context, an instance of Serializer.DocumentStream.InvalidDocument is raised.
def (self, content)
Creates a new Serializer.XmlDomCharacterData node into the context. If the node was not correctly inserted into the context, an instance of Serializer.DocumentStream.InvalidDocument is raised.
def (self, content)
Creates a new Serializer.XmlDomComment node into the context.
def (self, content)
Creates a new Serializer.XmlDomDtd node into the context. If the node was not correctly inserted into the context, an instance of Serializer.DocumentStream.InvalidDocument is raised.
def (self)
Finalize the Serializer.XmlDomDocument node of the context. If all the elements were not correctly closed, an instance of Serializer.DocumentStream.InvalidDocument is raised.
def (self, namespaceUri, localName, qualifiedName)
Finalize the last pushed Serializer.XmlDomElement of the context. If the closed element does not match the last pushed element, an instance of Serializer.DocumentStream.InvalidDocument is raised.
def (self, name, attributes)
Creates a new Serializer.XmlDomProcessingInstruction node into the context. If the node can not correctly be inserted into the context, an instance of Serializer.DocumentStream.InvalidDocument is raised.
def (self)
Creates a new Serializer.XmlDomDocument node into the context.
def (self, namespaceUri, localName, qualifiedName, attributes)
Creates a new Serializer.XmlDomElement node and push it in the context.
[]
Parent elements stack.
none
Document's root element.
null
Internal stream object.
null
Internal context object.
def (self, stream)
Creates a new stream for reading and writing data using stream.
def (self)
Reads the content of the stream and return it as an instance of Serializer.XmlDomDocument. If the content of the stream is not a valid XML, an instance of Serializer.DocumentStream.InvalidDocument is raised.
def (self, data)
Writes the XML described by data to the stream. The XML will be adapted
to match the configuration sets by setIndented and
setAutoClosing. Returns true if all the data have been correctly
writed; otherwise returns false. If the content of the data is not a
valid XML, an instance of Serializer.DocumentStream.InvalidDocument is
raised.
def (self, deep = false)
Returns a copy of this node. If deep is true, the copy also includes
the node’s descendants.
def (const self, offset)
Splits data at the given offset and returns the remainder as
Serializer.XmlDomText node.
def (const self)
Returns the string representation of the text node.
def (const self)
Returns the combined data of all direct Serializer.XmlDomText node siblings.
- Introduction
- Variables
-
Built-in-types
- Built-in-types#none
- Built-in-types#null
- Built-in-types#boolean
- Built-in-types#number
- Built-in-types#string
- Built-in-types#regex
- Built-in-types#array
- Built-in-types#hash
- Built-in-types#iterator
- Built-in-types#async_iterator
- Built-in-types#package
- Built-in-types#function
- Built-in-types#coroutine
- Built-in-types#library
- Built-in-types#libobject
- Arithmetic-operations
- Type-casting
- Control-structures
- Function-definition
- User-defined-types
- Work-with-modules