XMLAttributes are a list of name/value pairs for XML elements.


Functions | |
| LIBLAX_EXTERN int | XMLAttributes_add (XMLAttributes_t *xa, const char *name, const char *value) |
| Adds a name/value pair to this XMLAttributes_t structure. | |
| LIBLAX_EXTERN int | XMLAttributes_addWithNamespace (XMLAttributes_t *xa, const char *name, const char *value, const char *uri, const char *prefix) |
| Adds a name/value pair to this XMLAttributes_t structure with a prefix and URI defining a namespace. | |
| LIBLAX_EXTERN int | XMLAttributes_addWithTriple (XMLAttributes_t *xa, const XMLTriple_t *triple, const char *value) |
| Adds an attribute with the given XMLtriple/value pair to this XMLAttributes_t structure. | |
| LIBLAX_EXTERN int | XMLAttributes_clear (XMLAttributes_t *xa) |
| Clears (deletes) all attributes in this XMLAttributes object. | |
| LIBLAX_EXTERN XMLAttributes_t * | XMLAttributes_clone (const XMLAttributes_t *c) |
| Creates a deep copy of the given XMLAttributes_t structure. | |
| LIBLAX_EXTERN XMLAttributes_t * | XMLAttributes_create (void) |
| Creates a new empty XMLAttributes_t set. | |
| LIBLAX_EXTERN void | XMLAttributes_free (XMLAttributes_t *xa) |
| Frees the given XMLAttributes_t structure. | |
| LIBLAX_EXTERN int | XMLAttributes_getIndex (const XMLAttributes_t *xa, const char *name) |
| Return the index of an attribute with the given name. | |
| LIBLAX_EXTERN int | XMLAttributes_getIndexByNS (const XMLAttributes_t *xa, const char *name, const char *uri) |
| Return the index of an attribute with the given name and namespace URI. | |
| LIBLAX_EXTERN int | XMLAttributes_getIndexByTriple (const XMLAttributes_t *xa, const XMLTriple_t *triple) |
| Return the index of an attribute with the given XML triple. | |
| LIBLAX_EXTERN int | XMLAttributes_getLength (const XMLAttributes_t *xa) |
| Return the number of attributes in the set. | |
| LIBLAX_EXTERN char * | XMLAttributes_getName (const XMLAttributes_t *xa, int index) |
| Return the local name of an attribute in this XMLAttributes_t structure (by position). | |
| LIBLAX_EXTERN int | XMLAttributes_getNumAttributes (const XMLAttributes_t *xa) |
| Return the number of attributes in the set. | |
| LIBLAX_EXTERN char * | XMLAttributes_getPrefix (const XMLAttributes_t *xa, int index) |
| Return the value of an attribute in this XMLAttributes_t structure (by position). | |
| LIBLAX_EXTERN char * | XMLAttributes_getURI (const XMLAttributes_t *xa, int index) |
| Return the namespace URI of an attribute in this XMLAttributes_t structure (by position). | |
| LIBLAX_EXTERN char * | XMLAttributes_getValue (const XMLAttributes_t *xa, int index) |
| Return the value of an attribute in this XMLAttributes_t structure (by position). | |
| LIBLAX_EXTERN char * | XMLAttributes_getValueByName (const XMLAttributes_t *xa, const char *name) |
| Return an attribute's value by name. | |
| LIBLAX_EXTERN char * | XMLAttributes_getValueByNS (const XMLAttributes_t *xa, const char *name, const char *uri) |
| Return a value of an attribute with the given local name and namespace URI. | |
| LIBLAX_EXTERN char * | XMLAttributes_getValueByTriple (const XMLAttributes_t *xa, const XMLTriple_t *triple) |
| Return an attribute's value by XMLTriple. | |
| LIBLAX_EXTERN int | XMLAttributes_hasAttribute (const XMLAttributes_t *xa, int index) |
Predicate returning true or false depending on whether an attribute with the given index exists in this XMLAttributes_t structure. | |
| LIBLAX_EXTERN int | XMLAttributes_hasAttributeWithName (const XMLAttributes_t *xa, const char *name) |
Predicate returning true or false depending on whether an attribute with the given local name exists in this XMLAttributes_t structure. | |
| LIBLAX_EXTERN int | XMLAttributes_hasAttributeWithNS (const XMLAttributes_t *xa, const char *name, const char *uri) |
Predicate returning true or false depending on whether an attribute with the given local name and namespace URI exists in this XMLAttributes_t structure. | |
| LIBLAX_EXTERN int | XMLAttributes_hasAttributeWithTriple (const XMLAttributes_t *xa, const XMLTriple_t *triple) |
Predicate returning true or false depending on whether an attribute with the given XMLtriple_t exists in this XMLAttributes_t structure. | |
| LIBLAX_EXTERN int | XMLAttributes_isEmpty (const XMLAttributes_t *xa) |
Predicate returning true or false depending on whether this XMLAttributes_t structure is empty. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoBoolean (XMLAttributes_t *xa, const char *name, int *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute name into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoBooleanByTriple (XMLAttributes_t *xa, const XMLTriple_t *triple, int *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute with the given XMLTriple_t into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoDouble (XMLAttributes_t *xa, const char *name, double *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute name into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoDoubleByTriple (XMLAttributes_t *xa, const XMLTriple_t *triple, double *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute with the given XMLTriple_t into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoInt (XMLAttributes_t *xa, const char *name, int *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute name into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoIntByTriple (XMLAttributes_t *xa, const XMLTriple_t *triple, int *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute with the given XMLTriple_t into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoLong (XMLAttributes_t *xa, const char *name, long *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute name into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoLongByTriple (XMLAttributes_t *xa, const XMLTriple_t *triple, long *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute with the given XMLTriple_t into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoString (XMLAttributes_t *xa, const char *name, char **value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute name into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoStringByTriple (XMLAttributes_t *xa, const XMLTriple_t *triple, char **value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute with the given XMLTriple_t into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoUnsignedInt (XMLAttributes_t *xa, const char *name, unsigned int *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute name into value. | |
| LIBLAX_EXTERN int | XMLAttributes_readIntoUnsignedIntByTriple (XMLAttributes_t *xa, const XMLTriple_t *triple, unsigned int *value, XMLErrorLog_t *log, int required) |
| Reads the value for the attribute with the given XMLTriple_t into value. | |
| LIBLAX_EXTERN int | XMLAttributes_remove (XMLAttributes_t *xa, int n) |
| Removes an attribute (a name/value pair) from this XMLAttributes set. | |
| LIBLAX_EXTERN int | XMLAttributes_removeByName (XMLAttributes_t *xa, const char *name) |
| Removes an attribute with the given local name from this XMLAttributes set. | |
| LIBLAX_EXTERN int | XMLAttributes_removeByNS (XMLAttributes_t *xa, const char *name, const char *uri) |
| Removes an attribute with the given name and namespace URI from this XMLAttributes set. | |
| LIBLAX_EXTERN int | XMLAttributes_removeByTriple (XMLAttributes_t *xa, const XMLTriple_t *triple) |
| Removes an attribute with the given triple from this XMLAttributes set. | |
| LIBLAX_EXTERN int | XMLAttributes_removeResource (XMLAttributes_t *xa, int n) |
| Adds an attribute with the given name/value pair to this XMLAttributes_t structure. | |
| LIBLAX_EXTERN int XMLAttributes_add | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| const char * | value | ||
| ) |
Adds a name/value pair to this XMLAttributes_t structure.
| xa | the XMLAttributes_t structure |
| name | a string, the local name of the attribute. |
| value | a string, the value of the attribute. |
| LIBLAX_EXTERN int XMLAttributes_addWithNamespace | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| const char * | value, | ||
| const char * | uri, | ||
| const char * | prefix | ||
| ) |
Adds a name/value pair to this XMLAttributes_t structure with a prefix and URI defining a namespace.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| value | a string, the value of the attribute. |
| namespaceURI | a string, the namespace URI of the attribute. |
| prefix | a string, the prefix of the namespace |
| LIBLAX_EXTERN int XMLAttributes_addWithTriple | ( | XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple, | ||
| const char * | value | ||
| ) |
Adds an attribute with the given XMLtriple/value pair to this XMLAttributes_t structure.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the triple of the attribute. |
| value | a string, the value of the attribute. |
| LIBLAX_EXTERN int XMLAttributes_clear | ( | XMLAttributes_t * | xa | ) |
Clears (deletes) all attributes in this XMLAttributes object.
| xa | the XMLAttributes_t structure. |
| LIBLAX_EXTERN XMLAttributes_t* XMLAttributes_clone | ( | const XMLAttributes_t * | att | ) |
Creates a deep copy of the given XMLAttributes_t structure.
| att | the XMLAttributes_t structure to be copied |
| LIBLAX_EXTERN XMLAttributes_t* XMLAttributes_create | ( | void | ) |
Creates a new empty XMLAttributes_t set.
| LIBLAX_EXTERN void XMLAttributes_free | ( | XMLAttributes_t * | xa | ) |
Frees the given XMLAttributes_t structure.
| xa | the XMLAttributes_t structure to be freed. |
| LIBLAX_EXTERN int XMLAttributes_getIndex | ( | const XMLAttributes_t * | xa, |
| const char * | name | ||
| ) |
Return the index of an attribute with the given name.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute for which the index is required. |
| LIBLAX_EXTERN int XMLAttributes_getIndexByNS | ( | const XMLAttributes_t * | xa, |
| const char * | name, | ||
| const char * | uri | ||
| ) |
Return the index of an attribute with the given name and namespace URI.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute for which the index is required. |
| uri | a string, the namespace URI of the attribute. |
| LIBLAX_EXTERN int XMLAttributes_getIndexByTriple | ( | const XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple | ||
| ) |
| LIBLAX_EXTERN int XMLAttributes_getLength | ( | const XMLAttributes_t * | xa | ) |
Return the number of attributes in the set.
| xa | the XMLAttributes_t structure. |
| LIBLAX_EXTERN char* XMLAttributes_getName | ( | const XMLAttributes_t * | xa, |
| int | index | ||
| ) |
Return the local name of an attribute in this XMLAttributes_t structure (by position).
| xa | the XMLAttributes_t structure. |
| index | an integer, the position of the attribute whose name is required. |
| LIBLAX_EXTERN int XMLAttributes_getNumAttributes | ( | const XMLAttributes_t * | xa | ) |
Return the number of attributes in the set.
| xa | the XMLAttributes_t structure. |
| LIBLAX_EXTERN char* XMLAttributes_getPrefix | ( | const XMLAttributes_t * | xa, |
| int | index | ||
| ) |
Return the value of an attribute in this XMLAttributes_t structure (by position).
| xa | the XMLAttributes_t structure. |
| index | an integer, the position of the attribute whose value is required. |
| LIBLAX_EXTERN char* XMLAttributes_getURI | ( | const XMLAttributes_t * | xa, |
| int | index | ||
| ) |
Return the namespace URI of an attribute in this XMLAttributes_t structure (by position).
| xa | the XMLAttributes_t structure. |
| index | an integer, the position of the attribute whose namespace URI is required. |
| LIBLAX_EXTERN char* XMLAttributes_getValue | ( | const XMLAttributes_t * | xa, |
| int | index | ||
| ) |
Return the value of an attribute in this XMLAttributes_t structure (by position).
| xa | the XMLAttributes_t structure. |
| index | an integer, the position of the attribute whose value is required. |
| LIBLAX_EXTERN char* XMLAttributes_getValueByName | ( | const XMLAttributes_t * | xa, |
| const char * | name | ||
| ) |
Return an attribute's value by name.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute whose value is required. |
| LIBLAX_EXTERN char* XMLAttributes_getValueByNS | ( | const XMLAttributes_t * | xa, |
| const char * | name, | ||
| const char * | uri | ||
| ) |
Return a value of an attribute with the given local name and namespace URI.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute whose value is required. |
| uri | a string, the namespace URI of the attribute. |
| LIBLAX_EXTERN char* XMLAttributes_getValueByTriple | ( | const XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple | ||
| ) |
Return an attribute's value by XMLTriple.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the XML triple of the attribute whose value is required. |
| LIBLAX_EXTERN int XMLAttributes_hasAttribute | ( | const XMLAttributes_t * | xa, |
| int | index | ||
| ) |
Predicate returning true or false depending on whether an attribute with the given index exists in this XMLAttributes_t structure.
| xa | the XMLAttributes_t structure. |
| index | an integer, the position of the attribute. |
non-zero (true) if an attribute with the given index exists in this XMLAttributes_t structure, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_hasAttributeWithName | ( | const XMLAttributes_t * | xa, |
| const char * | name | ||
| ) |
Predicate returning true or false depending on whether an attribute with the given local name exists in this XMLAttributes_t structure.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
non-zero (true) if an attribute with the given local name exists in this XMLAttributes_t structure, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_hasAttributeWithNS | ( | const XMLAttributes_t * | xa, |
| const char * | name, | ||
| const char * | uri | ||
| ) |
Predicate returning true or false depending on whether an attribute with the given local name and namespace URI exists in this XMLAttributes_t structure.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| uri | a string, the namespace URI of the attribute. |
non-zero (true) if an attribute with the given local name and namespace URI exists in this XMLAttributes_t structure, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_hasAttributeWithTriple | ( | const XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple | ||
| ) |
Predicate returning true or false depending on whether an attribute with the given XMLtriple_t exists in this XMLAttributes_t structure.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the XML triple of the attribute. |
non-zero (true) if an attribute with the given XMLTriple_t exists in this XMLAttributes_t structure, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_isEmpty | ( | const XMLAttributes_t * | xa | ) |
Predicate returning true or false depending on whether this XMLAttributes_t structure is empty.
| xa | the XMLAttributes_t structure. |
non-zero (true) if this XMLAttributes_t structure is empty, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_readIntoBoolean | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| int * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute name into value.
If the given local name was not found or value could be interpreted as a boolean, value is not modified.
According to the W3C XML Schema, valid boolean values are: "true", "false", "1", and "0" (case-insensitive). For more information, see: http://www.w3.org/TR/xmlschema-2/#boolean
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| value | a boolean, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise.| LIBLAX_EXTERN int XMLAttributes_readIntoBooleanByTriple | ( | XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple, | ||
| int * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute with the given XMLTriple_t into value.
If the XMLTriple_t was not found or value could be interpreted as a boolean, value is not modified.
According to the W3C XML Schema, valid boolean values are: "true", "false", "1", and "0" (case-insensitive). For more information, see: http://www.w3.org/TR/xmlschema-2/#boolean
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the XML triple of the attribute. |
| value | a boolean, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_readIntoDouble | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| double * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute name into value.
If the given local name was not found or value could be interpreted as a double, value is not modified.
According to the W3C XML Schema, valid doubles are the same as valid doubles for C and the special values "INF", "-INF", and "NaN" (case-sensitive). For more information, see: http://www.w3.org/TR/xmlschema-2/#double
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| value | a boolean, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise.| LIBLAX_EXTERN int XMLAttributes_readIntoDoubleByTriple | ( | XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple, | ||
| double * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute with the given XMLTriple_t into value.
If the XMLTriple_t was not found or value could be interpreted as a double, value is not modified.
According to the W3C XML Schema, valid doubles are the same as valid doubles for C and the special values "INF", "-INF", and "NaN" (case-sensitive). For more information, see: http://www.w3.org/TR/xmlschema-2/#double
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the XML triple of the attribute. |
| value | a boolean, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_readIntoInt | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| int * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute name into value.
If the given local name was not found or value could be interpreted as an integer, value is not modified.
According to the W3C XML Schema valid integers include zero, *all* positive and *all* negative whole numbers. For practical purposes, we limit values to what can be stored in a int. For more information, see: http://www.w3.org/TR/xmlschema-2/#integer
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| value | a boolean, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise.| LIBLAX_EXTERN int XMLAttributes_readIntoIntByTriple | ( | XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple, | ||
| int * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute with the given XMLTriple_t into value.
If the XMLTriple_t was not found or value could be interpreted as an integer, value is not modified.
According to the W3C XML Schema valid integers include zero, *all* positive and *all* negative whole numbers. For practical purposes, we limit values to what can be stored in a int. For more information, see: http://www.w3.org/TR/xmlschema-2/#integer
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the XML triple of the attribute. |
| value | a boolean, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_readIntoLong | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| long * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute name into value.
If the given local name was not found or value could be interpreted as a long, value is not modified.
According to the W3C XML Schema valid integers include zero, *all* positive and *all* negative whole numbers. For practical purposes, we limit values to what can be stored in a long. For more information, see: http://www.w3.org/TR/xmlschema-2/#integer
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| value | a boolean, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise.| LIBLAX_EXTERN int XMLAttributes_readIntoLongByTriple | ( | XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple, | ||
| long * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute with the given XMLTriple_t into value.
If the XMLTriple_t was not found or value could be interpreted as a long, value is not modified.
According to the W3C XML Schema valid integers include zero, *all* positive and *all* negative whole numbers. For practical purposes, we limit values to what can be stored in a long. For more information, see: http://www.w3.org/TR/xmlschema-2/#integer
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the XML triple of the attribute. |
| value | a boolean, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_readIntoString | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| char ** | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute name into value.
If the given local name was not found, value is not modified.
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| value | a string, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise.| LIBLAX_EXTERN int XMLAttributes_readIntoStringByTriple | ( | XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple, | ||
| char ** | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute with the given XMLTriple_t into value.
If the XMLTriple_t was not found, value is not modified.
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the XML triple of the attribute. |
| value | a string, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_readIntoUnsignedInt | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| unsigned int * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute name into value.
If the given local name was not found or value could be interpreted as an unsigned int, value is not modified.
According to the W3C XML Schema valid integers include zero, *all* positive and *all* negative whole numbers. For practical purposes, we limit values to what can be stored in a unsigned int. For more information, see: http://www.w3.org/TR/xmlschema-2/#integer
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| value | an unsigned int, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise.| LIBLAX_EXTERN int XMLAttributes_readIntoUnsignedIntByTriple | ( | XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple, | ||
| unsigned int * | value, | ||
| XMLErrorLog_t * | log, | ||
| int | required | ||
| ) |
Reads the value for the attribute with the given XMLTriple_t into value.
If the XMLTriple_t was not found or value could be interpreted as an unsigned integer, value is not modified.
According to the W3C XML Schema valid integers include zero, *all* positive and *all* negative whole numbers. For practical purposes, we limit values to what can be stored in a unsigned int. For more information, see: http://www.w3.org/TR/xmlschema-2/#integer
If an XMLErrorLog is passed in datatype format errors are logged. If required is true, missing attributes are also logged.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple_t, the XML triple of the attribute. |
| value | an unsigned int, the value of the attribute. |
| log | an XMLErrorLog_t, the error log. |
| required | a boolean, indicating whether the attribute is required. |
non-zero (true) if the attribute was read into value, zero (false) otherwise. | LIBLAX_EXTERN int XMLAttributes_remove | ( | XMLAttributes_t * | xa, |
| int | n | ||
| ) |
Removes an attribute (a name/value pair) from this XMLAttributes set.
| xa | the XMLAttributes_t structure. |
| n | an integer the index of the resource to be deleted |
| LIBLAX_EXTERN int XMLAttributes_removeByName | ( | XMLAttributes_t * | xa, |
| const char * | name | ||
| ) |
Removes an attribute with the given local name from this XMLAttributes set.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute. |
| LIBLAX_EXTERN int XMLAttributes_removeByNS | ( | XMLAttributes_t * | xa, |
| const char * | name, | ||
| const char * | uri | ||
| ) |
Removes an attribute with the given name and namespace URI from this XMLAttributes set.
| xa | the XMLAttributes_t structure. |
| name | a string, the local name of the attribute for which the index is required. |
| uri | a string, the namespace URI of the attribute. |
| LIBLAX_EXTERN int XMLAttributes_removeByTriple | ( | XMLAttributes_t * | xa, |
| const XMLTriple_t * | triple | ||
| ) |
Removes an attribute with the given triple from this XMLAttributes set.
| xa | the XMLAttributes_t structure. |
| triple | an XMLTriple, the XML triple of the attribute for which the index is required. |
| LIBLAX_EXTERN int XMLAttributes_removeResource | ( | XMLAttributes_t * | xa, |
| int | n | ||
| ) |
Adds an attribute with the given name/value pair to this XMLAttributes_t structure.
This method is similar to the add method but an attribute with same name wont be overwritten. This facilitates the addition of multiple resource attributes to a annotations.
| xa | the XMLAttributes_t structure. |
| name | a string, the name of the attribute. |
| value | a string, the value of the attribute. LIBLAX_EXTERN void XMLAttributes_addResource (XMLAttributes_t *xa, const char *name, const char *value) { xa->addResource(name, value); } Removes an attribute (a name/value pair) from this XMLAttributes set. |
| xa | the XMLAttributes_t structure. |
| n | an integer the index of the resource to be deleted |