Skip to content

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

public class com.inscoper.api.XMLNode;

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

public synchronized void delete()

function XMLNode

public XMLNode()

Default constructor.

function XMLNode

public XMLNode(
    XMLNode node
)

Copy constructor.

Parameters:

function addChild

public XMLNode addChild(
    String childName
)

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

public XMLNode addChild()

Add a child node.

Return: The created child XML node

Creates and returns a child node with a specified name.

function removeChild

public void removeChild(
    String childName
)

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

public XMLNode getChild(
    String name
)

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

public XMLNodeVector getChildren(
    String name
)

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

public XMLNodeVector getChildren()

Get all children.

Return: The list of all child XML nodes

Retrieves all child nodes of this node.

function setName

public void setName(
    String name
)

Set the node name.

Parameters:

  • name : The name for the node

Sets the name of this XML node.

function getName

public String getName()

Get the node name.

Return: The name of the node

Retrieves the name of this XML node.

function isEmpty

public boolean isEmpty()

Check if node is empty.

Return: True if the node is empty, false otherwise

Check if the node is empty.

function addAttribute

public void addAttribute(
    String name,
    String value
)

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

public void addAttribute(
    String name,
    boolean value
)

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

public void addAttribute(
    String name,
    long value
)

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

public void addAttribute(
    String name,
    int value
)

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

public void addAttribute(
    String name,
    short value
)

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

public void addAttribute(
    String name,
    char value
)

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

public void addAttribute(
    String name,
    double value
)

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

public XMLAttribute getAttribute(
    String name
)

Get an attribute.

Parameters:

  • name : The name of the attribute

Return: The XML attribute

Retrieves the attribute with the specified name.

function getAttributes

public XMLAttributeVector getAttributes()

Get all attributes.

Return: The list of XML attributes

Retrieves all attributes of this node.

function addCDATA

public void addCDATA(
    String content
)

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

public String 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

protected XMLNode(
    long cPtr,
    boolean cMemoryOwn
)

function finalize

protected void finalize()

function getCPtr

protected static long getCPtr(
    XMLNode obj
)

function swigRelease

protected static long swigRelease(
    XMLNode obj
)

Protected Attributes Documentation

variable swigCMemOwn

transient boolean swigCMemOwn;

Updated on 2026-09-03 at 12:14:19 +0200