Platforms to show: All Mac Windows Linux Cross-Platform
XMLTextMBS class
Super class: XMLCharacterDataMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The XMLTextMBS interface inherits from XMLCharacterDataMBS and represents the textual content (termed character data in XML) of an XMLElementMBS or XMLAttributeMBS. If there is no markup inside an element's content, the text is contained in a single object implementing the XMLTextMBS interface that is the only child of the element. If there is markup, it is parsed into the information items (elements, comments, etc.) and XMLTextMBS nodes that form the list of children of the element.
When a document is first made available via the DOM, there is only one XMLTextMBS node for each block of text. Users may create adjacent XMLTextMBS 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 normalize() method on XMLNodeMBS merges any such adjacent XMLTextMBS objects into a single node for each block of text.
Subclass of the XMLCharacterDataMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 2 properties
- property IsElementContentWhitespace as Boolean
- property WholeText as String
- 2 methods
- method Constructor Private
- method splitText(Offset as Integer) as XMLTextMBS
Super class XMLCharacterDataMBS
- 2 properties
- 6 methods
- method appendData(data as string)
- method Constructor Private
- method deleteData(offset as Integer, count as Integer)
- method insertData(offset as Integer, data as string)
- method replaceData(offset as Integer, count as Integer, data as string)
- method substringData(offset as Integer, count as Integer) as String
Super class XMLNodeMBS
- 20 properties
- property AttributeCount as Integer
- property BaseURI as String
- property ChildCount as Integer
- property FirstChild as XMLNodeMBS
- property Handle as Integer
- property hasAttributes as Boolean
- property hasChildren as Boolean
- property LastChild as XMLNodeMBS
- property LocalName as String
- property NamespaceURI as String
- property NextSibling as XMLNodeMBS
- property NodeName as String
- property NodeType as Integer
- property NodeValue as String
- property OwnerDocument as XMLDocumentMBS
- property ParentNode as XMLNodeMBS
- property Prefix as String
- property PreviousSibling as XMLNodeMBS
- property ReferenceCount as Integer
- property toString as String
- 19 methods
- method appendChild(newChild as XMLNodeMBS) as XMLNodeMBS
- method AttributeNode(Index as Integer) as XMLAttributeMBS
- method AttributeNodes as XMLAttributeMBS()
- method Child(Index as Integer) as XMLNodeMBS
- method ChildNodes as XMLNodeMBS()
- method Clone(deep as Boolean) as XMLNodeMBS
- method compareDocumentPosition(other as XMLNodeMBS) as Integer
- method Constructor Private
- method insertBefore(newChild as XMLNodeMBS, refChild as XMLNodeMBS) as XMLNodeMBS
- method isDefaultNamespace(namespaceURI as String) as Boolean
- method isEqualNode(other as XMLNodeMBS) as Boolean
- method isSameNode(other as XMLNodeMBS) as Boolean
- method IterateAttributeNodes as XMLIterateAttributeNodesMBS
- method IterateChildNodes as XMLIterateChildNodesMBS
- method lookupNamespaceURI(prefix as String) as String
- method lookupPrefix(namespaceURI as String) as String
- method Normalize
- method removeChild(Node as XMLNodeMBS)
- method replaceChild(newChild as XMLNodeMBS, oldChild as XMLNodeMBS) as XMLNodeMBS
- 18 constants
Document Positions
Constant | Value | Description |
---|---|---|
DocumentPositionContainedBy | 16 |
The node is contained by the reference node. A node which is contained is always following, too. |
DocumentPositionContains | 8 |
The node contains the reference node. A node which contains is always preceding, too. |
DocumentPositionDisconnected | 1 |
The two nodes are disconnected. Order between disconnected nodes is always implementation-specific. |
DocumentPositionFollowing | 4 |
The node follows the reference node. |
DocumentPositionImplementationSpecific | 32 |
The determination of preceding versus following is implementation-specific. |
DocumentPositionPreceding | 2 |
The second node precedes the reference node. |
Types
Constant | Value | Description |
---|---|---|
TypeAttribute | 2 |
Attribute Node |
TypeCDataSection | 4 |
CDataSection Node |
TypeComment | 8 |
Comment Node |
TypeDocument | 9 |
Document Node |
TypeDocumentFragment | 11 |
Document Fragment |
TypeDocumentType | 10 |
Document Type Node |
TypeElement | 1 |
Element Node |
TypeEntity | 6 |
Entity Node |
TypeEntityReferenceNode | 5 |
Entity Reference Node |
TypeNotation | 12 |
Notation Node |
TypeProcessingInstruction | 7 |
Processing Instruction Node |
TypeText | 3 |
Text Node |
Sub classes:
Some methods using this class:
- XMLDocumentMBS.createTextNode(Text as String) as XMLTextMBS
Some examples using this class:
Xojo Developer Magazine
The items on this page are in the following plugins: MBS XML Plugin.
XMLSerializerMBS - XMLTreeWalkerMBS