Project

General

Profile

OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer
Loading...
Searching...
No Matches
OpenSpace3D high level xml parser

Functions

 XMLgetShortFloatToString (float)
 Convert a float value to a short string.
 
 XMLgetShortFloatToStringLength (float, nb)
 Convert a float value to a short string with a number of decimal.
 
 XMLgetBoolParam (markstr, name)
 Get the boolean value of a string.
 
 XMLgetBoolString (b)
 Get a string boolean value.
 
 XMLgetData (markstr)
 Get the data of a mark node.
 
 XMLsetData (markstr, data)
 Set the data of a mark node.
 
 XMLgetParam (markstr, name)
 Get an attribute value of a mark node.
 
 XMLsetParam (markstr, name, val)
 Set an attribute value of a mark node.
 
 XMLaddMark (xmlfilestr, value, father, params, data)
 Add a mark node to an xml structure.
 
 XMLcopyMark (xmlfilestr, srcmarkstr, father)
 Copy a mark node to an another parent node.
 
 XMLdelMark (xmlfilestr, markstr)
 Delete a mark node.
 
 XMLdelMarksFromMarkByValue (xmlfilestr, markstr, value)
 Delete all mark node from value.
 
 XMLmoveMark (xmlfilestr, markstr, fatherstr)
 Move a mark node to an another parent node.
 
 XMLgetMarkByValueFromMark (markstr, value)
 Search the first mark node with a value from a parent mark node, recursively.
 
 XMLgetMarkByValueFromMarkSons (markstr, value)
 Search the first mark node with a value from a parent mark node.
 
 XMLgetMarkByValue (xmlfilestr, value)
 Search the first mark node with a value from xml structure, recursively.
 
 XMLgetMarksByValueFromMark (markstr, value)
 Search all marks node with a value from a parent mark node, recursively.
 
 XMLgetMarksByValueFromMarkSons (markstr, value)
 Search all marks node with a value from a parent mark node.
 
 XMLgetMarksByValuesFromMarkSons (markstr, values)
 Search all marks node with a list of value from a parent mark node.
 
 XMLgetMarksDataByValueFromMark (markstr, value)
 Get all marks node data's with a value from a parent mark node, recursively.
 
 XMLgetMarksDataByValueFromMarkSons (markstr, value)
 Get all marks node data's with a value from a parent mark node.
 
 XMLgetMarksParamByValueFromMarkSons (markstr, value, param)
 Get all marks node attribute value with a node value and an attribute name from a parent mark node.
 
 XMLgetMarksByValue (xmlfilestr, value)
 Search all marks node with a value from xml structure, recursively.
 
 XMLgetMarksParamValueByParamFromMark (markstr, param)
 Get all marks node attribute value with an attribute name from a parent mark node, recursively.
 
 XMLgetMarksParamValueByValueAndParamFromMarkSons (markstr, value, param)
 Get all marks node attribute value with a node value and an attribute name from a parent mark node.
 
 XMLgetMarksParamValueByValueAndParamFromMark (markstr, value, param)
 Get all marks node attribute value with a node value and an attribute name from a parent mark node, recursively.
 
 XMLgetMarksParamValueByParam (xmlfilestr, param)
 Get all marks node attribute value with an attribute name in an xml structure, recursively.
 
 XMLgetMarkByParamValueFromMark (markstr, param, value)
 Get the first mark node with an attribute name and value from a parent mark node, recursively.
 
 XMLgetMarkByParamValueFromMarkSons (markstr, param, value)
 Get the first mark node with an attribute name and value from a parent mark node.
 
 XMLgetMarkByParamValue (xmlfilestr, param, value)
 Get the first mark node with an attribute name and value in an xml structure.
 
 XMLgetMarkByValueAndParamValue (xmlfilestr, markval, param, value)
 Get the first mark node with a value, and attribute name and value in an xml structure, recursively.
 
 XMLgetMarksByValueAndParamValue (xmlfilestr, markval, param, value)
 Get all marks node with a value, and attribute name and value in an xml structure, recursively.
 
 XMLgetMarkByValueAndParamValueFromMark (markstr, markval, param, value)
 Get the first mark node with a value, and attribute name and value in a parent mark node, recursively.
 
 XMLgetMarksByValueAndParamValueFromMark (markstr, markval, param, value)
 Get all marks node with a value, and attribute name and value in a parent mark node, recursively.
 
 XMLgetMarksByValueAndParamPrefixValueFromMark (markstr, markval, param, value)
 Get all marks node which start with a value, and attribute name and value in a parent mark node, recursively.
 
 XMLgetMarkByValueAndParamValueFromMarkSons (markstr, markval, param, value)
 Get the first mark node with a value, and attribute name and value in a parent mark node.
 
 XMLwrite (xmlfilestr, path)
 Write an Xml file from a xml structure.
 
 XMLwriteZipped (xmlfilestr, path)
 Write an Xml file from a xml structure with zipped content.
 
 XMLload (path)
 Load an Xml file.
 
 XMLloadString (fcont)
 Load an Xml content from a string.
 
 XMLcopy (xmlfilestr)
 Copy an Xml structure.
 
 XMLcreate (path, type)
 Create an empty Xml structure.
 
 XMLclose (xmlfilestr)
 Close an Xml structure.
 

Detailed Description

OpenSpace3D high level xml parser

Function Documentation

◆ XMLgetShortFloatToString()

XMLgetShortFloatToString ( float  )

Convert a float value to a short string.

Prototype: fun [F] S

Parameters
F: float value
Returns
S : short string

◆ XMLgetShortFloatToStringLength()

XMLgetShortFloatToStringLength ( float  ,
nb   
)

Convert a float value to a short string with a number of decimal.

Prototype: fun [F I] S

Parameters
F: float value
F: number of decimal
Returns
S : short string

◆ XMLgetBoolParam()

XMLgetBoolParam ( markstr  ,
name   
)

Get the boolean value of a string.

Prototype: fun [S] I

Parameters
S: the boolean value "enable" "1" "on" "true" "yes"
Returns
I : 1 if the boolean value is correct, 0 otherwise

◆ XMLgetBoolString()

XMLgetBoolString ( )

Get a string boolean value.

Prototype: fun [I] S

Parameters
I: the boolean value
Returns
S : "true" or "false"

◆ XMLgetData()

XMLgetData ( markstr  )

Get the data of a mark node.

Prototype: fun [XMLmark] S

Parameters
XMLmark: the mark node
Returns
S : the data

◆ XMLsetData()

XMLsetData ( markstr  ,
data   
)

Set the data of a mark node.

Prototype: fun [XMLmark S] S

Parameters
XMLmark: the mark node
S: the new data
Returns
S : the new data

◆ XMLgetParam()

XMLgetParam ( markstr  ,
name   
)

Get an attribute value of a mark node.

Prototype: fun [XMLmark S] S

Parameters
XMLmark: the mark node
S: the attribute name
Returns
S : the attribute value

◆ XMLsetParam()

XMLsetParam ( markstr  ,
name  ,
val   
)

Set an attribute value of a mark node.

Prototype: fun [XMLmark S S] I

Parameters
XMLmark: the mark node
S: the attribute name
S: the attribute value
Returns
0

◆ XMLaddMark()

XMLaddMark ( xmlfilestr  ,
value  ,
father  ,
params  ,
data   
)

Add a mark node to an xml structure.

Prototype: fun [XMLfile S XMLmark [[S S] r1] S] XMLmark

Parameters
XMLfile: the xml structure
S: the mark node value
XMLmark: the parent mark node
[[SS] r1] : list of [attribute value]
S: mark node data
Returns
XMLmark : the new mark node

◆ XMLcopyMark()

XMLcopyMark ( xmlfilestr  ,
srcmarkstr  ,
father   
)

Copy a mark node to an another parent node.

Prototype: fun [XMLfile XMLmark XMLmark] XMLmark

Parameters
XMLfile: the xml structure
XMLmark: the mark node to copy
XMLmark: the new parent mark node
Returns
XMLmark : the new mark node

◆ XMLdelMark()

XMLdelMark ( xmlfilestr  ,
markstr   
)

Delete a mark node.

Prototype: fun [XMLfile XMLmark] I

Parameters
XMLfile: the xml structure
XMLmark: the mark node to delete
Returns
0

◆ XMLdelMarksFromMarkByValue()

XMLdelMarksFromMarkByValue ( xmlfilestr  ,
markstr  ,
value   
)

Delete all mark node from value.

Prototype: fun [XMLfile markstr S] I

Parameters
XMLfile: the xml structure
XMLmark: the parent mark node
S: the mark node value
Returns
0

◆ XMLmoveMark()

XMLmoveMark ( xmlfilestr  ,
markstr  ,
fatherstr   
)

Move a mark node to an another parent node.

Prototype: fun [XMLfile XMLmark XMLmark] XMLmark

Parameters
XMLfile: the xml structure
XMLmark: the mark node to copy
XMLmark: the new parent mark node
Returns
XMLmark : the new mark node

◆ XMLgetMarkByValueFromMark()

XMLgetMarkByValueFromMark ( markstr  ,
value   
)

Search the first mark node with a value from a parent mark node, recursively.

Prototype: fun [XMLmark S] XMLmark

Parameters
XMLmark: the parent mark node
S: the mark node value to search
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLgetMarkByValueFromMarkSons()

XMLgetMarkByValueFromMarkSons ( markstr  ,
value   
)

Search the first mark node with a value from a parent mark node.

Prototype: fun [XMLmark S] XMLmark

Parameters
XMLmark: the parent mark node
S: the mark node value to search
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLgetMarkByValue()

XMLgetMarkByValue ( xmlfilestr  ,
value   
)

Search the first mark node with a value from xml structure, recursively.

Prototype: fun [XMLfile S] XMLmark

Parameters
XMLfile: the xml structure
S: the mark node value to search
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLgetMarksByValueFromMark()

XMLgetMarksByValueFromMark ( markstr  ,
value   
)

Search all marks node with a value from a parent mark node, recursively.

Prototype: fun [XMLmark S] [XMLmark r1]

Parameters
XMLmark: the parent mark node
S: the mark node value to search
Returns
[XMLmark r1] : the list of mark node if found, nil otherwise

◆ XMLgetMarksByValueFromMarkSons()

XMLgetMarksByValueFromMarkSons ( markstr  ,
value   
)

Search all marks node with a value from a parent mark node.

Prototype: fun [XMLmark S] [XMLmark r1]

Parameters
XMLmark: the parent mark node
S: the mark node value to search
Returns
[XMLmark r1] : the list of mark node if found, nil otherwise

◆ XMLgetMarksByValuesFromMarkSons()

XMLgetMarksByValuesFromMarkSons ( markstr  ,
values   
)

Search all marks node with a list of value from a parent mark node.

Prototype: fun [XMLmark [S r1]] [[S [XMLmark r1]] r1]

Parameters
XMLmark: the parent mark node
[Sr1] : the mark node values to search
Returns
[[S [XMLmark r1]] r1] : the list of marks nodes if found, nil otherwise

◆ XMLgetMarksDataByValueFromMark()

XMLgetMarksDataByValueFromMark ( markstr  ,
value   
)

Get all marks node data's with a value from a parent mark node, recursively.

Prototype: fun [XMLmark S] [S r1]

Parameters
XMLmark: the parent mark node
S: the mark node value to search
Returns
[S r1] : the list of data if found, nil otherwise

◆ XMLgetMarksDataByValueFromMarkSons()

XMLgetMarksDataByValueFromMarkSons ( markstr  ,
value   
)

Get all marks node data's with a value from a parent mark node.

Prototype: fun [XMLmark S] [S r1]

Parameters
XMLmark: the parent mark node
S: the mark node value to search
Returns
[S r1] : the list of data if found, nil otherwise

◆ XMLgetMarksParamByValueFromMarkSons()

XMLgetMarksParamByValueFromMarkSons ( markstr  ,
value  ,
param   
)

Get all marks node attribute value with a node value and an attribute name from a parent mark node.

Prototype: fun [XMLmark S S] [S r1]

Parameters
XMLmark: the parent mark node
S: the mark node value to search
S: the attribute name to retrieve
Returns
[S r1] : the list of attribute values if found, nil otherwise

◆ XMLgetMarksByValue()

XMLgetMarksByValue ( xmlfilestr  ,
value   
)

Search all marks node with a value from xml structure, recursively.

Prototype: fun [XMLfile S] [XMLmark r1]

Parameters
XMLfile: the xml structure
S: the mark node value to search
Returns
[XMLmark r1] : the list of mark node if found, nil otherwise

◆ XMLgetMarksParamValueByParamFromMark()

XMLgetMarksParamValueByParamFromMark ( markstr  ,
param   
)

Get all marks node attribute value with an attribute name from a parent mark node, recursively.

Prototype: fun [XMLmark S] [S r1]

Parameters
XMLmark: the parent mark node
S: the attribute name to retrieve
Returns
[S r1] : the list of attribute values if found, nil otherwise

◆ XMLgetMarksParamValueByValueAndParamFromMarkSons()

XMLgetMarksParamValueByValueAndParamFromMarkSons ( markstr  ,
value  ,
param   
)

Get all marks node attribute value with a node value and an attribute name from a parent mark node.

Prototype: fun [XMLmark S S] [S r1]

Parameters
XMLmark: the parent mark node
S: the mark node value to search
S: the attribute name to retrieve
Returns
[S r1] : the list of attribute values if found, nil otherwise

◆ XMLgetMarksParamValueByValueAndParamFromMark()

XMLgetMarksParamValueByValueAndParamFromMark ( markstr  ,
value  ,
param   
)

Get all marks node attribute value with a node value and an attribute name from a parent mark node, recursively.

Prototype: fun [XMLmark S S] [S r1]

Parameters
XMLmark: the parent mark node
S: the mark node value to search
S: the attribute name to retrieve
Returns
[S r1] : the list of attribute values if found, nil otherwise

◆ XMLgetMarksParamValueByParam()

XMLgetMarksParamValueByParam ( xmlfilestr  ,
param   
)

Get all marks node attribute value with an attribute name in an xml structure, recursively.

Prototype: fun [XMLmark S] [S r1]

Parameters
XMLfile: the xml structure
S: the attribute name to retrieve
Returns
[S r1] : the list of attribute values if found, nil otherwise

◆ XMLgetMarkByParamValueFromMark()

XMLgetMarkByParamValueFromMark ( markstr  ,
param  ,
value   
)

Get the first mark node with an attribute name and value from a parent mark node, recursively.

Prototype: fun [XMLmark S S] XMLmark

Parameters
XMLmark: the parent mark node
S: the attribute name
S: the attribute value
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLgetMarkByParamValueFromMarkSons()

XMLgetMarkByParamValueFromMarkSons ( markstr  ,
param  ,
value   
)

Get the first mark node with an attribute name and value from a parent mark node.

Prototype: fun [XMLmark S S] XMLmark

Parameters
XMLmark: the parent mark node
S: the attribute name
S: the attribute value
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLgetMarkByParamValue()

XMLgetMarkByParamValue ( xmlfilestr  ,
param  ,
value   
)

Get the first mark node with an attribute name and value in an xml structure.

Prototype: fun [XMLfile S S] XMLmark

Parameters
XMLfile: the xml structure
S: the attribute name
S: the attribute value
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLgetMarkByValueAndParamValue()

XMLgetMarkByValueAndParamValue ( xmlfilestr  ,
markval  ,
param  ,
value   
)

Get the first mark node with a value, and attribute name and value in an xml structure, recursively.

Prototype: fun [XMLfile S S S] XMLmark

Parameters
XMLfile: the xml structure
S: the mark node value
S: the attribute name
S: the attribute value
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLgetMarksByValueAndParamValue()

XMLgetMarksByValueAndParamValue ( xmlfilestr  ,
markval  ,
param  ,
value   
)

Get all marks node with a value, and attribute name and value in an xml structure, recursively.

Prototype: fun [XMLfile S S S] [XMLmark r1]

Parameters
XMLfile: the xml structure
S: the mark node value
S: the attribute name
S: the attribute value
Returns
[XMLmark r1] : the list of marks node if found, nil otherwise

◆ XMLgetMarkByValueAndParamValueFromMark()

XMLgetMarkByValueAndParamValueFromMark ( markstr  ,
markval  ,
param  ,
value   
)

Get the first mark node with a value, and attribute name and value in a parent mark node, recursively.

Prototype: fun [XMLmark S S S] XMLmark

Parameters
XMLmark: the parent mark node
S: the mark node value
S: the attribute name
S: the attribute value
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLgetMarksByValueAndParamValueFromMark()

XMLgetMarksByValueAndParamValueFromMark ( markstr  ,
markval  ,
param  ,
value   
)

Get all marks node with a value, and attribute name and value in a parent mark node, recursively.

Prototype: fun [XMLmark S S S] [XMLmark r1]

Parameters
XMLmark: the parent mark node
S: the mark node value
S: the attribute name
S: the attribute value
Returns
[XMLmark r1] : the list of marks node if found, nil otherwise

◆ XMLgetMarksByValueAndParamPrefixValueFromMark()

XMLgetMarksByValueAndParamPrefixValueFromMark ( markstr  ,
markval  ,
param  ,
value   
)

Get all marks node which start with a value, and attribute name and value in a parent mark node, recursively.

Prototype: fun [XMLmark S S S] [XMLmark r1]

Parameters
XMLmark: the parent mark node
S: the mark node value
S: the attribute name
S: the attribute value prefix
Returns
[XMLmark r1] : the list of marks node if found, nil otherwise

◆ XMLgetMarkByValueAndParamValueFromMarkSons()

XMLgetMarkByValueAndParamValueFromMarkSons ( markstr  ,
markval  ,
param  ,
value   
)

Get the first mark node with a value, and attribute name and value in a parent mark node.

Prototype: fun [XMLmark S S S] XMLmark

Parameters
XMLmark: the parent mark node
S: the mark node value
S: the attribute name
S: the attribute value
Returns
XMLmark : the mark node if found, nil otherwise

◆ XMLwrite()

XMLwrite ( xmlfilestr  ,
path   
)

Write an Xml file from a xml structure.

Prototype: fun [XMLfile S] I

Parameters
XMLfile: the xml structure
S: the file path
Returns
0

◆ XMLwriteZipped()

XMLwriteZipped ( xmlfilestr  ,
path   
)

Write an Xml file from a xml structure with zipped content.

Prototype: fun [XMLfile S] I

Parameters
XMLfile: the xml structure
S: the file path
Returns
0

◆ XMLload()

XMLload ( path  )

Load an Xml file.

Prototype: fun [S] XMLfile

Parameters
S: the xml file path
Returns
XMLfile : the loaded xml structure

◆ XMLloadString()

XMLloadString ( fcont  )

Load an Xml content from a string.

Prototype: fun [S] XMLfile

Parameters
S: the xml content
Returns
XMLfile : the loaded xml structure

◆ XMLcopy()

XMLcopy ( xmlfilestr  )

Copy an Xml structure.

Prototype: fun [XMLfile] XMLfile

Parameters
XMLfile: the xml structure to copy
Returns
XMLfile : the new xml structure

◆ XMLcreate()

XMLcreate ( path  ,
type   
)

Create an empty Xml structure.

Prototype: fun [S S] XMLfile

Parameters
S: the xml file path
S: the xml data type
Returns
XMLfile : the new xml structure

◆ XMLclose()

XMLclose ( xmlfilestr  )

Close an Xml structure.

Prototype: fun [XMLfile] I

Parameters
XMLfile: the xml structure
Returns
0