serializer.xmldomstream - Palamecia/mint GitHub Wiki
Module
load serializer.xmldomstream
This module provides the Serializer.XmlDomStream class which allow to read and write XML documents with a DOM algorithm.
Packages
Enums
Serializer.XmlDomException.Code
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 |
Classes
Serializer.XmlDomAttribute
This class represents one attribute in the DOM tree.
Inherits
Public members
Modifiers | Member | Description |
---|---|---|
override const |
cloneNode | Returns a copy of this node. If deep is true , the copy also includes the ... |
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.XmlAttribute attribute . |
const |
toString | Returns the string representation of the attribute. |
Private members
Modifiers | Member | Description |
---|---|---|
final |
attribute |
Serializer.XmlDomCData
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.
Inherits
Public members
Modifiers | Member | Description |
---|---|---|
const |
toString | Returns the string representation of the CDATA node. |
Serializer.XmlDomCharacterData
This class represents abstract character data in the parsed XML document.
Inherits
Public members
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 ... |
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 ins... |
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 t... |
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 o... |
Protected members
Modifiers | Member | Description |
---|---|---|
final |
data | Internal content data. |
Serializer.XmlDomComment
This class represents comment data in the parsed XML document.
Inherits
Public members
Modifiers | Member | Description |
---|---|---|
override const |
cloneNode | Returns a copy of this node. If deep is true , the copy also includes the ... |
const |
toString | Returns the string representation of the comment node. |
Serializer.XmlDomDocument
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.
Inherits
Public members
Modifiers | Member | Description |
---|---|---|
const |
adoptNode | Moves node from another document and returns it. An instance of Serializer.... |
override const |
cloneNode | Returns a copy of this node. If deep is true , the copy also includes the ... |
const |
createAttribute | Creates a new instance of Serializer.XmlDomAttribute with the given qualifi ... |
const |
createAttributeNS | Creates a new instance of Serializer.XmlDomAttribute with the givens namesp ... |
const |
createCDATASection | Creates a new instance of Serializer.XmlDomCData with the given data for th... |
const |
createComment | Creates a new instance of Serializer.XmlDomComment with the given data for ... |
const |
createDocumentFragment | Creates a new instance of Serializer.XmlDomDocument for this document. |
const |
createElement | Creates a new instance of Serializer.XmlDomElement with the givens qualifie ... |
const |
createElementNS | Creates a new instance of Serializer.XmlDomElement with the givens namespac ... |
const |
createProcessingInstruction | Creates a new instance of Serializer.XmlDomProcessingInstruction with the giv... |
const |
createTextNode | Creates a new instance of Serializer.XmlDomText with the given data for thi... |
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 ... |
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.XmlDomElement with a n... |
const |
getElementsByTagNameNS | Returns an iterator on each top level child Serializer.XmlDomElement with a n... |
const |
getProcessingInstructions | Returns an iterator on each top level Serializer.XmlDomProcessingInstruction ... |
const |
importNode | Returns a copy of node . If deep is true , the copy also includes the n ... |
const |
toString | Returns the string representation of the document. |
Serializer.XmlDomDocumentFragment
This class represents a fragment of the DOM tree.
Inherits
Public members
Modifiers | Member | Description |
---|---|---|
const |
getElementById | Returns the first element within node’s descendants whose ID is elementId ... |
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. |
Serializer.XmlDomDtd
This class is the representation of the DTD in the document tree.
Inherits
Public members
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 ... |
const |
new | Creates a new DTD node for the text given by content . |
const |
toString | Returns the string representation of the DTD node. |
Private members
Modifiers | Member | Description |
---|---|---|
final |
content | Internal content data. |
Serializer.XmlDomElement
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.
Inherits
Public members
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 ... |
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 ; o... |
const |
getAttributes | Returns an instance of Serializer.XmlAttributes containing each attributes of... |
const |
getClassList | Returns an array containing the list of values in the class attribute of th... |
const |
getClassName | Returns the value of the class attribute of the element or none if the el... |
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 with a name... |
const |
getElementsByTagNameNS | Returns an iterator on each direct child Serializer.XmlDomElement with a name... |
const |
getId | Returns the value of the id attribute of the element or none if the eleme... |
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 ele... |
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 qualifiedNam ... |
const |
hasAttributeNS | Returns true if this element has an attribute with the given namespaceUri ... |
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... |
const |
removeAttributeNode | Removes the attribute attr from the list and returns it. The list must cont... |
const |
removeAttributeNodeNS | Removes the attribute attr from the list and returns it. The list must cont... |
const |
setAttribute | Sets the value of the attribute with the given qualifiedName to value . If... |
const |
setAttributeNS | Sets the value of the attribute with the given namespaceUri and qualified ... |
const |
setAttributeNode | Sets the attribute attr into the list. If an attribute with the same qualif... |
const |
setAttributeNodeNS | Sets the attribute attr into the list. If an attribute with the same namesp... |
const |
toString | Returns the string representation of the element. |
const |
toggleAttribute | Toggles the attribute with the given qualifiedName, removing it if it is pr ... |
Private members
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. |
Serializer.XmlDomException
This class provides the context of a DOM exception.
Inherits
Public members
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. |
Private members
Modifiers | Member | Description |
---|---|---|
final |
code | Internal exception code. |
final |
message | Internal exception message. |
final |
name | Internal exception name. |
Serializer.XmlDomNamedNodeMap
This class represents an attribute list in the DOM tree.
Public members
Modifiers | Member | Description |
---|---|---|
const |
!= | Returns true if other is not equal to this list of attributes; otherwise ... |
const |
== | Returns true if other is equal to this list of attributes; otherwise retu... |
const |
contains | Returns true if the list contains an attribute with the given qualifiedNa ... |
const |
containsNS | Returns true if the list contains an attribute with the givens namespaceU ... |
const |
getNamedItem | Returns the first attribute with the given qualifiedName ; otherwise null . |
const |
getNamedItemNS | Returns the first attribute with the givens namespaceUri and localName ; o... |
const |
in | Returns true if the list contains an attribute with the given qualifiedNa ... |
const |
indexOf | Returns the index position of the first attribute with the given qualifiedN ... |
const |
indexOfNS | Returns the index position of the first attribute with the givens namespace ... |
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 attrib... |
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 qualif... |
const |
setNamedItemNS | Sets the attribute attr into the list. If an attribute with the same namesp... |
const |
size | Returns the number of attributes in the list. |
const |
toString | Returns the string representation of the attribute list. |
Private members
Modifiers | Member | Description |
---|---|---|
final |
attributes | Internal attributes. |
Serializer.XmlDomNode
This class represents abstract node in the parsed XML document.
Public members
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.XmlDomExcep... |
const |
cloneNode | Returns a copy of this node. If deep is true , the copy also includes the ... |
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 n... |
const |
getLastChild | Returns the last child of this node of this node or null id the node has no... |
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 ma... |
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... |
const |
insertBefore | Inserts node before child in this node. If child is none , the is inse... |
const |
isEqualNode | Returns true is self and other are equals nodes (i.e self and other ... |
const |
isSameNode | Returns true is self and other are the same node (i.e self is other ... |
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.XmlDomElement; oth... |
const |
remove | Removes the node at the given index from this node. An instance of Serializ... |
const |
removeChild | Removes node from this node. An instance of Serializer.XmlDomException is r... |
const |
replace | Replaces the node at the given index with node in this node. An instance ... |
const |
replaceChild | Replaces the child node with node in this node. An instance of Serializer... |
Protected members
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 nod... |
final |
parent | Internal parent node. |
Serializer.XmlDomProcessingInstruction
This class represents an XML processing instruction. A processing instruction have a target name and one or more ettributes.
Inherits
Public members
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 ... |
const |
getAttribute | Returns the attribute with the given qualifiedName . |
const |
getAttributes | Returns an instance of Serializer.XmlAttributes containing each attributes of... |
const |
getTarget | Returns the target name of the processing instruction. |
const |
hasAttribute | Returns true if this element has an attribute with the given qualifiedNam ... |
const |
new | Creates a new processing instruction with the given name target name and ``... |
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... |
const |
setTarget | Sets the target name of the processing instruction. |
const |
toString | Returns the string representation of the processing instruction. |
Private members
Modifiers | Member | Description |
---|---|---|
final |
attributes | Internal attributes list. |
final |
target | Internal target name. |
Serializer.XmlDomStream
This class class provides a way to read and write XML documents using a DOM algorithm.
Inherits
Public members
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 ... |
Private members
Modifiers | Member | Description |
---|---|---|
class |
Context | This class provides the parsing context to convert XML into nodes. |
final |
context | Internal context object. |
Serializer.XmlDomStream.Context
This class provides the parsing context to convert XML into nodes.
Public members
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.XmlDomCData node into the context. If the node was n... |
const |
onCharacters | Creates a new Serializer.XmlDomCharacterData node into the context. If the no... |
const |
onComment | Creates a new Serializer.XmlDomComment node into the context. |
const |
onDtd | Creates a new Serializer.XmlDomDtd node into the context. If the node was not... |
const |
onEndDocument | Finalize the Serializer.XmlDomDocument node of the context. If all the elemen... |
const |
onEndElement | Finalize the last pushed Serializer.XmlDomElement of the context. If the clos... |
const |
onProcessingInstruction | Creates a new Serializer.XmlDomProcessingInstruction node into the context. I... |
const |
onStartDocument | Creates a new Serializer.XmlDomDocument node into the context. |
const |
onStartElement | Creates a new Serializer.XmlDomElement node and push it in the context. |
final |
parentElements | Parent elements stack. |
final |
rootElement | Document's root element. |
Private members
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. |
Serializer.XmlDomText
This class represents text data in the parsed XML document.
Inherits
Public members
Modifiers | Member | Description |
---|---|---|
override const |
cloneNode | Returns a copy of this node. If deep is true , the copy also includes the ... |
const |
splitText | Splits data at the given offset and returns the remainder as Serializer.Xml... |
const |
toString | Returns the string representation of the text node. |
const |
wholeText | Returns the combined data of all direct Serializer.XmlDomText node siblings. |
Descriptions
Serializer.XmlDomAttribute.attribute
null
Serializer.XmlDomAttribute.cloneNode
def (self, deep = false)
Returns a copy of this node. If deep
is true
, the copy also includes
the node’s descendants.
Serializer.XmlDomAttribute.getLocalName
def (const self)
Returns the local name of the attribute.
Serializer.XmlDomAttribute.getNamespaceUri
def (const self)
Returns the namespace URI of the attribute.
Serializer.XmlDomAttribute.getNodeValue
def (const self)
Returns the node's meaningfull value.
Serializer.XmlDomAttribute.getOwnerElement
def (const self)
Returns the owner element of the attribute.
Serializer.XmlDomAttribute.getPrefix
def (const self)
Returns the prefix (namespace) of the attribute.
Serializer.XmlDomAttribute.getQualifiedName
def (const self)
Returns the qualified name of the attribute (prefix + name).
Serializer.XmlDomAttribute.getTextContent
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
Serializer.XmlDomAttribute.getValue
def (const self)
Returns the value of the attribute.
Serializer.XmlDomAttribute.new
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
.
Serializer.XmlDomAttribute.toString
def (const self)
Returns the string representation of the attribute.
Serializer.XmlDomCData.toString
def (const self)
Returns the string representation of the CDATA node.
Serializer.XmlDomCharacterData.==
def (const self, const other)
Returns true
if other
is equal to self
; otherwise returns false
.
Serializer.XmlDomCharacterData.appendData
def (self, data)
Appends the string data
to the stored string.
Serializer.XmlDomCharacterData.data
''
Internal content data.
Serializer.XmlDomCharacterData.deleteData
def (self, offset, count)
Deletes a substring of length count
from position offset
.
An instance of Serializer.XmlDomException is raised on error.
Serializer.XmlDomCharacterData.getData
def (const self)
Returns the content of the text node.
Serializer.XmlDomCharacterData.getNodeValue
def (const self)
Returns the node's meaningfull value.
Serializer.XmlDomCharacterData.getTextContent
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
Serializer.XmlDomCharacterData.insertData
def (self, offset, data)
Inserts the string data
into the stored string at position offset
.
An instance of Serializer.XmlDomException is raised on error.
Serializer.XmlDomCharacterData.length
def (const self)
Returns the length of the data.
Serializer.XmlDomCharacterData.new
def (self, data)
Creates a new character node for the characters given by data
.
Serializer.XmlDomCharacterData.replaceData
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.
Serializer.XmlDomCharacterData.setData
def (self, content)
Sets the content of the text node.
Serializer.XmlDomCharacterData.size
def (const self)
Returns the length of the data.
Serializer.XmlDomCharacterData.substringData
def (const self, offset, count)
Returns the substring of length count
from position offset
.
An instance of Serializer.XmlDomException is raised on error.
Serializer.XmlDomComment.cloneNode
def (self, deep = false)
Returns a copy of this node. If deep
is true
, the copy also includes
the node’s descendants.
Serializer.XmlDomComment.toString
def (const self)
Returns the string representation of the comment node.
Serializer.XmlDomDocument.adoptNode
def (self, node)
Moves node
from another document and returns it.
An instance of Serializer.XmlDomException is raised on error.
Serializer.XmlDomDocument.cloneNode
def (self, deep = false)
Returns a copy of this node. If deep
is true
, the copy also includes
the node’s descendants.
Serializer.XmlDomDocument.createAttribute
def (self, qualifiedName)
Creates a new instance of Serializer.XmlDomAttribute with the given
qualifiedlName
for this document.
Serializer.XmlDomDocument.createAttributeNS
def (self, namespaceUri, qualifiedName)
Creates a new instance of Serializer.XmlDomAttribute with the givens
namespaceUri
and qualifiedlName
for this document.
Serializer.XmlDomDocument.createCDATASection
def (self, data)
Creates a new instance of Serializer.XmlDomCData with the given data
for this document.
Serializer.XmlDomDocument.createComment
def (self, data)
Creates a new instance of Serializer.XmlDomComment with the given data
for this document.
Serializer.XmlDomDocument.createDocumentFragment
def (self)
Creates a new instance of Serializer.XmlDomDocument for this document.
Serializer.XmlDomDocument.createElement
def (self, qualifiedlName, attributes = Serializer.XmlAttributes ())
Creates a new instance of Serializer.XmlDomElement with the givens
qualifiedlName
and attributes
for this document.
Serializer.XmlDomDocument.createElementNS
def (self, namespaceUri, qualifiedName, attributes = Serializer.XmlAttributes ())
Creates a new instance of Serializer.XmlDomElement with the givens
namespaceUri
, qualifiedlName
and attributes
for this document.
Serializer.XmlDomDocument.createProcessingInstruction
def (self, target, data)
Creates a new instance of Serializer.XmlDomProcessingInstruction with
the givens target
and data
for this document.
Serializer.XmlDomDocument.createTextNode
def (self, data)
Creates a new instance of Serializer.XmlDomText with the given data
for this document.
Serializer.XmlDomDocument.getDoctype
def (const self)
Returns the document type of this document.
Serializer.XmlDomDocument.getDocumentElement
def (const self)
Returns the root element of the document.
Serializer.XmlDomDocument.getElementById
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.
Serializer.XmlDomDocument.getElementsByClassName
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.
Serializer.XmlDomDocument.getElementsByTagName
def (const self, qualifiedName)
Returns an iterator on each top level child Serializer.XmlDomElement
with a name that match qualifiedName
.
Serializer.XmlDomDocument.getElementsByTagNameNS
def (const self, namespaceUri, localName)
Returns an iterator on each top level child Serializer.XmlDomElement
with a name that match namespaceUri
and localName
.
Serializer.XmlDomDocument.getProcessingInstructions
def (const self)
Returns an iterator on each top level Serializer.XmlDomProcessingInstruction of the document.
Serializer.XmlDomDocument.importNode
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.
Serializer.XmlDomDocument.toString
def (const self)
Returns the string representation of the document.
Serializer.XmlDomDocumentFragment.getElementById
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.
Serializer.XmlDomDocumentFragment.getTextContent
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
Serializer.XmlDomDocumentFragment.toString
def (const self)
Returns the string representation of the document fragment.
Serializer.XmlDomDtd.==
def (const self, const other)
Returns true
if other
is equal to self
; otherwise returns false
.
Serializer.XmlDomDtd.cloneNode
def (self, deep = false)
Returns a copy of this node. If deep
is true
, the copy also includes
the node’s descendants.
Serializer.XmlDomDtd.content
''
Internal content data.
Serializer.XmlDomDtd.new
def (self, content)
Creates a new DTD node for the text given by content
.
Serializer.XmlDomDtd.toString
def (const self)
Returns the string representation of the DTD node.
Serializer.XmlDomElement.==
def (const self, const other)
Returns true
if other
is equal to self
; otherwise returns false
.
Serializer.XmlDomElement.attributes
null
Internal attributes list.
Serializer.XmlDomElement.cloneNode
def (self, deep = false)
Returns a copy of this node. If deep
is true
, the copy also includes
the node’s descendants.
Serializer.XmlDomElement.getAttribute
def (const self, qualifiedName)
Returns the attribute with the given qualifiedName
.
Serializer.XmlDomElement.getAttributeNS
def (const self, namespaceUri, localName)
Returns the attribute with the given namespaceUri
and localName
.
Serializer.XmlDomElement.getAttributeNames
def (const self)
Returns an iterator on each element's attribute's qualified name.
Serializer.XmlDomElement.getAttributeNode
def (const self, qualifiedName)
Returns the first attribute with the given qualifiedName
; otherwise
null
.
Serializer.XmlDomElement.getAttributeNodeNS
def (const self, namespaceUri, localName)
Returns the first attribute with the givens namespaceUri
and
localName
; otherwise null
.
Serializer.XmlDomElement.getAttributes
def (const self)
Returns an instance of Serializer.XmlAttributes containing each attributes of the element.
Serializer.XmlDomElement.getClassList
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.
Serializer.XmlDomElement.getClassName
def (const self)
Returns the value of the class
attribute of the element or none
if
the element has no class name.
Serializer.XmlDomElement.getElementsByClassName
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.
Serializer.XmlDomElement.getElementsByTagName
def (const self, qualifiedName)
Returns an iterator on each direct child Serializer.XmlDomElement with
a name that match qualifiedName
.
Serializer.XmlDomElement.getElementsByTagNameNS
def (const self, namespaceUri, localName)
Returns an iterator on each direct child Serializer.XmlDomElement with
a name that match namespaceUri
and localName
.
Serializer.XmlDomElement.getId
def (const self)
Returns the value of the id
attribute of the element or none
if the
element has no ID.
Serializer.XmlDomElement.getLocalName
def (const self)
Returns the name of the tag.
Serializer.XmlDomElement.getNamespaceUri
def (const self)
Returns the namespace URI of the tag.
Serializer.XmlDomElement.getPrefix
def (const self)
Returns the prefix (namespace) of the tag.
Serializer.XmlDomElement.getSlot
def (const self)
Returns the value of the slot
attribute of the element or none
if
the element has no class slot.
Serializer.XmlDomElement.getTagName
def (const self)
Returns the qualified name of the tag (prefix + name).
Serializer.XmlDomElement.getTextContent
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
Serializer.XmlDomElement.hasAttribute
def (const self, qualifiedName)
Returns true
if this element has an attribute with the given
qualifiedName
; otherwise returns false
.
Serializer.XmlDomElement.hasAttributeNS
def (const self, namespaceUri, localName)
Returns true
if this element has an attribute with the given
namespaceUri
and localName
; otherwise returns false
.
Serializer.XmlDomElement.hasAttributes
def (const self)
Returns true
if the element has attributes; otherwise false
.
Serializer.XmlDomElement.localName
''
Internal tag name.
Serializer.XmlDomElement.namespaceUri
''
Internal tag namespace URI.
Serializer.XmlDomElement.new
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
.
Serializer.XmlDomElement.qualifiedName
''
Internal tag qualified name.
Serializer.XmlDomElement.removeAttribute
def (self, qualifiedName)
Removes the attribute with the given qualifiedName
from this element.
Serializer.XmlDomElement.removeAttributeNS
def (self, namespaceUri, localName)
Removes the attribute with the given namespaceUri
and localName
from this element.
Serializer.XmlDomElement.removeAttributeNode
def (self, attr)
Removes the attribute attr
from the list and returns it. The list must
contains an attribute with the same qualified name.
Serializer.XmlDomElement.removeAttributeNodeNS
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.
Serializer.XmlDomElement.setAttribute
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.
Serializer.XmlDomElement.setAttributeNS
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.
Serializer.XmlDomElement.setAttributeNode
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.
Serializer.XmlDomElement.setAttributeNodeNS
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.
Serializer.XmlDomElement.toString
def (const self)
Returns the string representation of the element.
Serializer.XmlDomElement.toggleAttribute
def (self, qualifiedName)
Toggles the attribute with the given qualifiedName`, removing it if it is present and adding it if it is not present.
Returns true
if the attribute is now present; otherwise false.
�
def (self, qualifiedName, force)
If force
is true
, adds an attribute with the given qualifiedName. If
forceis
false, removes the attribute with the given qualifiedName
.
Returns true
if the attribute is now present; otherwise false.
Serializer.XmlDomException.Code.ABORT_ERR
20
Serializer.XmlDomException.Code.DATA_CLONE_ERR
25
Serializer.XmlDomException.Code.DOMSTRING_SIZE_ERR
2
Serializer.XmlDomException.Code.HIERARCHY_REQUEST_ERR
3
Serializer.XmlDomException.Code.INDEX_SIZE_ERR
1
Serializer.XmlDomException.Code.INUSE_ATTRIBUTE_ERR
10
Serializer.XmlDomException.Code.INVALID_ACCESS_ERR
15
Serializer.XmlDomException.Code.INVALID_CHARACTER_ERR
5
Serializer.XmlDomException.Code.INVALID_MODIFICATION_ERR
13
Serializer.XmlDomException.Code.INVALID_NODE_TYPE_ERR
24
Serializer.XmlDomException.Code.INVALID_STATE_ERR
11
Serializer.XmlDomException.Code.NAMESPACE_ERR
14
Serializer.XmlDomException.Code.NETWORK_ERR
19
Serializer.XmlDomException.Code.NOT_FOUND_ERR
8
Serializer.XmlDomException.Code.NOT_SUPPORTED_ERR
9
Serializer.XmlDomException.Code.NO_DATA_ALLOWED_ERR
6
Serializer.XmlDomException.Code.NO_MODIFICATION_ALLOWED_ERR
7
Serializer.XmlDomException.Code.QUOTA_EXCEEDED_ERR
22
Serializer.XmlDomException.Code.SECURITY_ERR
18
Serializer.XmlDomException.Code.SYNTAX_ERR
12
Serializer.XmlDomException.Code.TIMEOUT_ERR
23
Serializer.XmlDomException.Code.TYPE_MISMATCH_ERR
17
Serializer.XmlDomException.Code.URL_MISMATCH_ERR
21
Serializer.XmlDomException.Code.VALIDATION_ERR
16
Serializer.XmlDomException.Code.WRONG_DOCUMENT_ERR
4
Serializer.XmlDomException.Messages
none
This hash provides the messages associated to the values of Serializer.XmlDomException.Code.
Serializer.XmlDomException.Names
none
This hash provides the names associated to the values of Serializer.XmlDomException.Code.
Serializer.XmlDomException.code
none
Internal exception code.
Serializer.XmlDomException.getCode
def (const self)
Returns the code of the exception or none
if there is no code.
Serializer.XmlDomException.getMessage
def (const self)
Returns the message of the exception.
Serializer.XmlDomException.getName
def (const self)
Returns the name of the exception.
Serializer.XmlDomException.message
''
Internal exception message.
Serializer.XmlDomException.name
''
Internal exception name.
Serializer.XmlDomException.new
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.
Serializer.XmlDomException.toString
def (const self)
Returns the exception informations as a string.
Serializer.XmlDomNamedNodeMap.!=
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.
Serializer.XmlDomNamedNodeMap.==
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.
Serializer.XmlDomNamedNodeMap.attributes
[]
Internal attributes.
Serializer.XmlDomNamedNodeMap.contains
def (const self, const qualifiedName)
Returns true
if the list contains an attribute with the given
qualifiedName
; otherwise returns false
.
Serializer.XmlDomNamedNodeMap.containsNS
def (const self, namespaceUri, const localName)
Returns true
if the list contains an attribute with the givens
namespaceUri
and localName
; otherwise returns false
.
Serializer.XmlDomNamedNodeMap.getNamedItem
def (const self, const qualifiedName)
Returns the first attribute with the given qualifiedName
; otherwise
null
.
Serializer.XmlDomNamedNodeMap.getNamedItemNS
def (const self, namespaceUri, const localName)
Returns the first attribute with the givens namespaceUri
and
localName
; otherwise null
.
Serializer.XmlDomNamedNodeMap.in
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.
Serializer.XmlDomNamedNodeMap.indexOf
def (const self, const qualifiedName)
Returns the index position of the first attribute with the given
qualifiedName
. Returns none
if no element matched.
Serializer.XmlDomNamedNodeMap.indexOfNS
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.
Serializer.XmlDomNamedNodeMap.isEmpty
def (const self)
Returns true
if the list is empty; otherwise returns false
.
Serializer.XmlDomNamedNodeMap.item
def (const self, index)
Returns the attribute at the given index
in the list or null
if no
attribute can be found.
Serializer.XmlDomNamedNodeMap.length
def (const self)
Returns the number of attributes in the list.
Serializer.XmlDomNamedNodeMap.new
def (self)
Creates a new attribute list.
Serializer.XmlDomNamedNodeMap.removeNamedItem
def (self, const qualifiedName)
Removes the first attribute with the given qualifiedName
.
Serializer.XmlDomNamedNodeMap.removeNamedItemNS
def (self, const namespaceUri, const localName)
Removes the first attribute with the givens namespaceUri
and
localName
.
Serializer.XmlDomNamedNodeMap.setNamedItem
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.
Serializer.XmlDomNamedNodeMap.setNamedItemNS
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.
Serializer.XmlDomNamedNodeMap.size
def (const self)
Returns the number of attributes in the list.
Serializer.XmlDomNamedNodeMap.toString
def (const self)
Returns the string representation of the attribute list.
Serializer.XmlDomNode.!=
def (const self, const other)
Returns false
if other
is equal to self
; otherwise returns true
.
Serializer.XmlDomNode.==
def (const self, const other)
Returns true
if other
is equal to self
; otherwise returns false
.
Serializer.XmlDomNode.appendChild
def (self, node)
Appends node
at the end of this node.
An instance of Serializer.XmlDomException is raised on error.
Serializer.XmlDomNode.children
[]
Internal child node list.
Serializer.XmlDomNode.cloneNode
def (self, deep = false)
Returns a copy of this node. If deep
is true
, the copy also includes
the node’s descendants.
Serializer.XmlDomNode.contains
def (const self, const other)
Serializer.XmlDomNode.document
null
Internal document node.
Serializer.XmlDomNode.findRecursive
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.
Serializer.XmlDomNode.getChildNodes
def (const self)
Returns an array containing the children nodes of this node.
Serializer.XmlDomNode.getFirstChild
def (const self)
Returns the first child of this node of this node or null
id the node
has no children.
Serializer.XmlDomNode.getLastChild
def (const self)
Returns the last child of this node of this node or null
id the node
has no children.
Serializer.XmlDomNode.getNextSibling
def (const self)
Returns the next sibling in the document tree or null
.
Serializer.XmlDomNode.getNodeValue
def (const self)
Returns the node's meaningfull value.
Serializer.XmlDomNode.getOwnerDocument
def (const self)
Returns the document to which this node belongs.
Serializer.XmlDomNode.getParentNode
def (const self)
Returns the parent node. If this node has no parent, null
is returned.
Serializer.XmlDomNode.getPreviousSibling
def (const self)
Returns the previous sibling in the document tree or null
.
Serializer.XmlDomNode.getRootNode
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
.
Serializer.XmlDomNode.getTextContent
def (const self)
Returns the node's text content by concatenating its meaningfull value with the value of each its descendants recursively.
Serializer.XmlDomNode.hasChildNodes
def (const self)
Returns true
if the node has childrens; otherwise returns false
.
Serializer.XmlDomNode.in
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.
Serializer.XmlDomNode.insert
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.
Serializer.XmlDomNode.insertBefore
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.
Serializer.XmlDomNode.isEqualNode
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
.
Serializer.XmlDomNode.isSameNode
def (const self, const other)
Returns true
is self
and other
are the same node (i.e self
is
other
); otherwise returns false
.
Serializer.XmlDomNode.normalize
def (self)
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
Serializer.XmlDomNode.parent
null
Internal parent node.
Serializer.XmlDomNode.parentElement
def (const self)
Returns the parent node if it is an instance of Serializer.XmlDomElement;
otherwise returns null
.
Serializer.XmlDomNode.remove
def (self, index)
Removes the node at the given index
from this node.
An instance of Serializer.XmlDomException is raised on error.
Serializer.XmlDomNode.removeChild
def (self, node)
Removes node
from this node.
An instance of Serializer.XmlDomException is raised on error.
Serializer.XmlDomNode.replace
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.
Serializer.XmlDomNode.replaceChild
def (self, node, child)
Replaces the child
node with node
in this node.
An instance of Serializer.XmlDomException is raised on error.
Serializer.XmlDomProcessingInstruction.==
def (const self, const other)
Returns true
if other
is equal to self
; otherwise returns false
.
Serializer.XmlDomProcessingInstruction.attributes
none
Internal attributes list.
Serializer.XmlDomProcessingInstruction.cloneNode
def (self, deep = false)
Returns a copy of this node. If deep
is true
, the copy also includes
the node’s descendants.
Serializer.XmlDomProcessingInstruction.getAttribute
def (const self, qualifiedName)
Returns the attribute with the given qualifiedName
.
Serializer.XmlDomProcessingInstruction.getAttributes
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.
Serializer.XmlDomProcessingInstruction.getTarget
def (const self)
Returns the target name of the processing instruction.
Serializer.XmlDomProcessingInstruction.hasAttribute
def (const self, qualifiedName)
Returns true
if this element has an attribute with the given
qualifiedName
; otherwise returns false
.
Serializer.XmlDomProcessingInstruction.new
def (self, target, data)
Creates a new processing instruction with the given name
target name
and data
attribute list.
Serializer.XmlDomProcessingInstruction.removeAttribute
def (self, qualifiedName)
Removes the attribute with the given qualifiedName
from this element.
Serializer.XmlDomProcessingInstruction.setAttribute
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.
Serializer.XmlDomProcessingInstruction.setTarget
def (self, target)
Sets the target name of the processing instruction.
Serializer.XmlDomProcessingInstruction.target
''
Internal target name.
Serializer.XmlDomProcessingInstruction.toString
def (const self)
Returns the string representation of the processing instruction.
Serializer.XmlDomStream.Context.currentElement
none
Current element.
Serializer.XmlDomStream.Context.currentParent
def (const self)
Returns the stack's top parent element if any or the document root node.
Serializer.XmlDomStream.Context.document
none
Current document node.
Serializer.XmlDomStream.Context.documentType
none
Document's type definition.
Serializer.XmlDomStream.Context.new
def (self, stream)
Creates a new parsing context.
Serializer.XmlDomStream.Context.onCData
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.
Serializer.XmlDomStream.Context.onCharacters
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.
Serializer.XmlDomStream.Context.onComment
def (self, content)
Creates a new Serializer.XmlDomComment node into the context.
Serializer.XmlDomStream.Context.onDtd
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.
Serializer.XmlDomStream.Context.onEndDocument
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.
Serializer.XmlDomStream.Context.onEndElement
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.
Serializer.XmlDomStream.Context.onProcessingInstruction
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.
Serializer.XmlDomStream.Context.onStartDocument
def (self)
Creates a new Serializer.XmlDomDocument node into the context.
Serializer.XmlDomStream.Context.onStartElement
def (self, namespaceUri, localName, qualifiedName, attributes)
Creates a new Serializer.XmlDomElement node and push it in the context.
Serializer.XmlDomStream.Context.parentElements
[]
Parent elements stack.
Serializer.XmlDomStream.Context.rootElement
none
Document's root element.
Serializer.XmlDomStream.Context.stream
null
Internal stream object.
Serializer.XmlDomStream.context
null
Internal context object.
Serializer.XmlDomStream.new
def (self, stream)
Creates a new stream for reading and writing data using stream
.
Serializer.XmlDomStream.read
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.
Serializer.XmlDomStream.write
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.
Serializer.XmlDomText.cloneNode
def (self, deep = false)
Returns a copy of this node. If deep
is true
, the copy also includes
the node’s descendants.
Serializer.XmlDomText.splitText
def (const self, offset)
Splits data at the given offset
and returns the remainder as
Serializer.XmlDomText node.
Serializer.XmlDomText.toString
def (const self)
Returns the string representation of the text node.
Serializer.XmlDomText.wholeText
def (const self)
Returns the combined data of all direct Serializer.XmlDomText node siblings.