::class xmlText public subclass xmlNode inherit xmlCharacterData

CLASS: xmlText

The XMLText interface inherits from XMLCharacterData and represents the textual content (termed character data in XML)
of an xmlElement or xmlAttr. If there is no markup inside an element's content, the text is contained in a single
object implementing the xmlText interface that is the only child of the element. If there is markup, it is parsed into
the information items (elements, comments, etc.) and xmlText nodes that form the list of children of the element.

When a document is first made available via the DOM, there is only one xmlText node for each block of text. Users may
create adjacent xmlText nodes that represent the contents of a given element without any intervening markup, but
should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not
(in general) persist between DOM editing sessions. The xmlNode normalize method merges any such adjacent
xmlText objects into a single node for each block of text.

No lexical check is done on the content of a xmlText node and, depending on its position in the document, some
characters must be escaped during serialization using character references; e.g. the characters "<&" if the textual
content is part of an element or of an attribute, the character sequence "]]>" when part of an element, the quotation
mark character " or the apostrophe character ' when part of an attribute.

Definition at line 1317 of xmlDOM.cls

Public Methods

  init (content)
text - The xmlText node created with the specified content. replaceWholeText (content)
text - The new node, of the same type as this node. splitText (offset)
  wholeText ()

Public Attributes

  isElementContentWhitespace

Private Attributes

  isElementContentWhitespace
no comment

Public Class Methods inherited from xmlNode

number - unique identifier for the new xmlNode getId ()

Public Methods inherited from xmlNode

node - the node appended appendChild (child)
nodes - A xmlNodeList that contains all the children of this node. children ()
node - the duplicated node cloneNode (deep=.false)
number - Position relatively to the reference node compareDocumentPosition (other)
child - The first child of this node firstChild ()
domObject - An object which implements the specialized APIs or .nil getFeature (feature, version)
userdata - the DOMUserData associated, or .nil if there was none getUserData (key)
boolean - .true if this node has any attributes, .false otherwise hasAttributes ()
boolean - .true if this node has any children, .false otherwise hasChildNodes ()
  init ()
node - the node being inserted insertBefore (child, where)
boolean - .true if default, .false otherwise isDefaultNamespace (uri)
boolean - .true if equal, .false otherwise isEqualNode (other)
boolean - .true if the nodes are the same, .false otherwise. isSameNode (other)
boolean - .true if supported on this node, .false otherwise. isSupported (feature, version)
aNode - The last child of this node. lastChild ()
aString - The associated namespaceURI or .nil if none is found. lookupNamespaceURI (prefix)
aString - An associated namespace prefix or .nil if none is found lookupPrefix (uri)
aNode - The node immediately following this node. normalize ()
aNode - The node immediately preceding this node. removeChild (child)
aNode - The node replaced. replaceChild (new, old)
  setReadOnly (attrName, attrValue)
userData - The DOMUserData previously associated to the given key on this node, or null if there was none. setUserData (key, data, handler)
  textContent ()

Public Attributes inherited from xmlNode

  attributes
  attributes
no comment
  baseURI
  baseURI
no comment
  childNodes
  childNodes
no comment
  localName
  localName
no comment
  namespaceURI
  namespaceURI
no comment
  nextSibling
  nodeName
  nodeName
no comment
  nodeType
  nodeType
no comment
  nodeValue
  nodeValue
no comment
  ownerDocument
  ownerDocument
no comment
  parentNode
  parentNode
no comment
  prefix
  prefix
no comment
  previousSibling
  textContent
no comment

Private Class Attributes inherited from xmlNode

  instances

Private Methods inherited from xmlNode

  treeWalk (nodes, name, nl)

Private Attributes inherited from xmlNode

  id

Public Methods mixed in from xmlCharacterData

  appendData (arg)
  data ()
  deleteData (offset, count)
  init (data)
  insertData (offset, string)
  length ()
  replaceData (offset, count, string)
string - The specified substring. If the sum of offset and count exceeds the length, then all characters to the end of the data are returned. substringData (offset, count)

Public Class Methods inherited from xmlNode

number - unique identifier for the new xmlNode getId ()

Public Methods inherited from xmlNode

node - the node appended appendChild (child)
nodes - A xmlNodeList that contains all the children of this node. children ()
node - the duplicated node cloneNode (deep=.false)
number - Position relatively to the reference node compareDocumentPosition (other)
child - The first child of this node firstChild ()
domObject - An object which implements the specialized APIs or .nil getFeature (feature, version)
userdata - the DOMUserData associated, or .nil if there was none getUserData (key)
boolean - .true if this node has any attributes, .false otherwise hasAttributes ()
boolean - .true if this node has any children, .false otherwise hasChildNodes ()
  init ()
node - the node being inserted insertBefore (child, where)
boolean - .true if default, .false otherwise isDefaultNamespace (uri)
boolean - .true if equal, .false otherwise isEqualNode (other)
boolean - .true if the nodes are the same, .false otherwise. isSameNode (other)
boolean - .true if supported on this node, .false otherwise. isSupported (feature, version)
aNode - The last child of this node. lastChild ()
aString - The associated namespaceURI or .nil if none is found. lookupNamespaceURI (prefix)
aString - An associated namespace prefix or .nil if none is found lookupPrefix (uri)
aNode - The node immediately following this node. normalize ()
aNode - The node immediately preceding this node. removeChild (child)
aNode - The node replaced. replaceChild (new, old)
  setReadOnly (attrName, attrValue)
userData - The DOMUserData previously associated to the given key on this node, or null if there was none. setUserData (key, data, handler)
  textContent ()

Public Attributes inherited from xmlNode

  attributes
  attributes
no comment
  baseURI
  baseURI
no comment
  childNodes
  childNodes
no comment
  localName
  localName
no comment
  namespaceURI
  namespaceURI
no comment
  nextSibling
  nodeName
  nodeName
no comment
  nodeType
  nodeType
no comment
  nodeValue
  nodeValue
no comment
  ownerDocument
  ownerDocument
no comment
  parentNode
  parentNode
no comment
  prefix
  prefix
no comment
  previousSibling
  textContent
no comment

Private Class Attributes inherited from xmlNode

  instances

Private Methods inherited from xmlNode

  treeWalk (nodes, name, nl)

Private Attributes inherited from xmlNode

  id

Instantiated by

xmlDOM.cls line 2398

Subclassed by

xmlCDATASection

Feature Detail

xmlText::attribute isElementContentWhitespace get

Returns whether this text node contains element content whitespace, often abusively called "ignorable whitespace". The
text node is determined to contain whitespace in element content during the load of the document or if validation
occurs while using the xmlDocument normalizeDocument method.

Definition at line 1323 of xmlDOM.cls

xmlText::attribute isElementContentWhitespace set private
Definition at line 1324 of xmlDOM.cls

xmlText::method wholeText

Returns all text of xmlText nodes logically-adjacent text nodes to this node, concatenated in document order.

For instance, in the example below wholeText on the xmlText node that contains "bar" returns "barfoo", and also
on the xmlText node that contains "foo" it returns "barfoo".


Definition at line 1331 of xmlDOM.cls

xmlText::method init

xmlText instance constructor

Parameters
content - The text string representing the content

Definition at line 1342 of xmlDOM.cls

xmlText::method replaceWholeText

Replaces the text of the current node and all logically-adjacent text nodes with the specified text. All
logically-adjacent text nodes are removed including the current node unless it was the recipient of the replacement
text.
This method returns the node which received the replacement text. The returned node is:


Assumption: Text and CDATASections are the only ones within Element nodes (and possibly within Attr nodes).

Parameters
content - The content of the replacing xmlText node.
Returns
text - The xmlText node created with the specified content.

Definition at line 1373 of xmlDOM.cls

xmlText::method splitText

Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings. After being split, this
node will contain all the content up to the offset point. A new node of the same type, which contains all the content
at and after the offset point, is returned. If the original node had a parent node, the new node is inserted as the
next sibling of the original node. When the offset is equal to the length of this node, the new node has no data.

Parameters
offset - The offset at which to split, starting from 0.
Returns
text - The new node, of the same type as this node.
Raises
user domException - INDEX_SIZE_ERR

Definition at line 1391 of xmlDOM.cls

Get RexxLiterate at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on 30 Jul 2015 13:56:54 for xmlDOM for OOrexx by rexxliterate  0.0.1