com.inscoper.api.XMLNode¶
XMLNode class represents a node in an XML document. More...
Public Functions¶
| Name | |
|---|---|
| synchronized void | delete() |
| XMLNode() Default constructor. |
|
| XMLNode(XMLNode node) Copy constructor. |
|
| XMLNode | addChild(String childName) Add a child node. |
| XMLNode | addChild() Add a child node. |
| void | removeChild(String childName) Remove a child node. |
| XMLNode | getChild(String name) Get a child node. |
| XMLNodeVector | getChildren(String name) Get all children with a specific name. |
| XMLNodeVector | getChildren() Get all children. |
| void | setName(String name) Set the node name. |
| String | getName() Get the node name. |
| boolean | isEmpty() Check if node is empty. |
| void | addAttribute(String name, String value) Add a string attribute. |
| void | addAttribute(String name, boolean value) Add a boolean attribute. |
| void | addAttribute(String name, long value) Add an unsigned int attribute. |
| void | addAttribute(String name, int value) Add an unsigned short attribute. |
| void | addAttribute(String name, short value) Add an unsigned char attribute. |
| void | addAttribute(String name, char value) Add a char attribute. |
| void | addAttribute(String name, double value) Add a double attribute. |
| XMLAttribute | getAttribute(String name) Get an attribute. |
| XMLAttributeVector | getAttributes() Get all attributes. |
| void | addCDATA(String content) Add a CDATA section. |
| String | getText() Get the text content of a node. |
Protected Functions¶
| Name | |
|---|---|
| XMLNode(long cPtr, boolean cMemoryOwn) | |
| void | finalize() |
| long | getCPtr(XMLNode obj) |
| long | swigRelease(XMLNode obj) |
Protected Attributes¶
| Name | |
|---|---|
| transient boolean | swigCMemOwn |
Detailed Description¶
XMLNode class represents a node in an XML document.
This class allows tree traversal, manipulation, and access to attributes and children of an XML element.
Public Functions Documentation¶
function delete¶
function XMLNode¶
Default constructor.
function XMLNode¶
Copy constructor.
Parameters:
- node : The XMLNode to copy
function addChild¶
Add a child node.
Parameters:
- childName : The name of the child node
Return: The created child XML node
Creates and returns a child node with a specified name.
function addChild¶
Add a child node.
Return: The created child XML node
Creates and returns a child node with a specified name.
function removeChild¶
Remove a child node.
Parameters:
- childName : The name of the child node to remove
Removes the first child node matching the specified name.
function getChild¶
Get a child node.
Parameters:
- name : The name of the child node
Return: The child XML node
Retrieves the first child node with the specified name.
function getChildren¶
Get all children with a specific name.
Parameters:
- name : The name of the child nodes
Return: The list of matching XML nodes
Retrieves all child nodes matching the specified name.
function getChildren¶
Get all children.
Return: The list of all child XML nodes
Retrieves all child nodes of this node.
function setName¶
Set the node name.
Parameters:
- name : The name for the node
Sets the name of this XML node.
function getName¶
Get the node name.
Return: The name of the node
Retrieves the name of this XML node.
function isEmpty¶
Check if node is empty.
Return: True if the node is empty, false otherwise
Check if the node is empty.
function addAttribute¶
Add a string attribute.
Parameters:
- name : The name of the attribute
- value : The string value of the attribute
Adds a string attribute to the node.
function addAttribute¶
Add a boolean attribute.
Parameters:
- name : The name of the attribute
- value : The boolean value of the attribute
Adds a boolean attribute to the node.
function addAttribute¶
Add an unsigned int attribute.
Parameters:
- name : The name of the attribute
- value : The unsigned int value of the attribute
Adds an unsigned int attribute to the node.
function addAttribute¶
Add an unsigned short attribute.
Parameters:
- name : The name of the attribute
- value : The unsigned short value of the attribute
Adds an unsigned short attribute to the node.
function addAttribute¶
Add an unsigned char attribute.
Parameters:
- name : The name of the attribute
- value : The unsigned char value of the attribute
Adds an unsigned char attribute to the node.
function addAttribute¶
Add a char attribute.
Parameters:
- name : The name of the attribute
- value : The char value of the attribute
Adds a char attribute to the node.
function addAttribute¶
Add a double attribute.
Parameters:
- name : The name of the attribute
- value : The double value of the attribute
Adds a double attribute to the node.
function getAttribute¶
Get an attribute.
Parameters:
- name : The name of the attribute
Return: The XML attribute
Retrieves the attribute with the specified name.
function getAttributes¶
Get all attributes.
Return: The list of XML attributes
Retrieves all attributes of this node.
function addCDATA¶
Add a CDATA section.
Parameters:
- content : The raw string content to wrap in CDATA
Appends a CDATA child node containing the given raw text content. Use this to embed content that contains XML special characters (e.g. FXML).
function getText¶
Get the text content of a node.
Return: The text content as a string, or an empty string if none
Returns the text value of the node's first text or CDATA child.
Protected Functions Documentation¶
function XMLNode¶
function finalize¶
function getCPtr¶
function swigRelease¶
Protected Attributes Documentation¶
variable swigCMemOwn¶
Updated on 2026-09-03 at 12:14:19 +0200