Skip to content

XMLAttribute

Bases: object

XMLAttribute class represents an attribute of an XML node.

This class provides methods to access the value of an XML attribute in various data types.

__init__(*args)

Overload 1:

Default constructor.

|

Overload 2:

Copy constructor.

Parameters:

Name Type Description Default
node XMLAttribute

The XMLAttribute to copy

required

asString()

Get value as string.

Retrieves the attribute value as a string.

Returns:

Type Description
str

The string value

asInt()

Get value as int.

Retrieves the attribute value as an int.

Returns:

Type Description
int

The int value

asUInt()

Get value as unsigned int.

Retrieves the attribute value as an unsigned int.

Returns:

Type Description
int

The unsigned int value

asDouble()

Get value as double.

Retrieves the attribute value as a double.

Returns:

Type Description
float

The double value

asFloat()

Get value as float.

Retrieves the attribute value as a float.

Returns:

Type Description
float

The float value

asBool()

Get value as boolean.

Retrieves the attribute value as a boolean.

Returns:

Type Description
boolean

The boolean value

asLLong()

Get value as long long.

Retrieves the attribute value as a long long.

Returns:

Type Description
int

The long long value

asULLong()

Get value as unsigned long long.

Retrieves the attribute value as an unsigned long long.

Returns:

Type Description
int

The unsigned long long value

asUShort()

Get value as unsigned short.

Retrieves the attribute value as an unsigned short.

Returns:

Type Description
int

The unsigned short value

asUChar()

Get value as int.

Retrieves the attribute value as an int.

Returns:

Type Description
int

The int value

asChar()

Get value as char.

Retrieves the attribute value as a char.

Returns:

Type Description
int

The char value

isEmpty()

Check if attribute is empty.

Check if the attribute has no value.

Returns:

Type Description
boolean

True if the attribute is empty, false otherwise