Qore XML Module
1.5.1.1
|
Modules | |
XML Generation Constants | |
The constants in this group can be combined with binary or to affect the output of generated XML. | |
XML Parsing Constants | |
The constants in this group can be combined with binary or to affect the output of parsed XML. | |
Namespaces | |
Qore::Xml | |
Xml namespace. | |
Functions | |
auto | Qore::Xml::get_xml_value (auto n) |
Helper function returning an XML value. More... | |
string | Qore::Xml::makeFormattedXMLRPCCallString (string method,...) |
Serializes the argument into an XML string in XML-RPC call format with whitespace formatting. More... | |
string | Qore::Xml::makeFormattedXMLRPCCallStringArgs (string method, any argv) |
Serializes the argument into an XML string in XML-RPC call format with whitespace formatting. More... | |
string | Qore::Xml::makeFormattedXMLRPCCallStringArgsWithEncoding (string encoding, string method, any argv) |
Serializes the argument into an XML string in XML-RPC call format with whitespace formatting. More... | |
string | Qore::Xml::makeFormattedXMLRPCCallStringWithEncoding (string encoding, string method,...) |
Serializes the argument into an XML string in XML-RPC call format with whitespace formatting with an explicit encoding. More... | |
string | Qore::Xml::makeFormattedXMLRPCFaultResponseString (softint code, string msg) |
Serializes the argument into an XML string in XML-RPC fault response format with whitespace formatting. More... | |
string | Qore::Xml::makeFormattedXMLRPCFaultResponseStringWithEncoding (string encoding, softint code, string msg) |
Serializes the argument into an XML string in XML-RPC fault response format with whitespace formatting with an explicit output encoding. More... | |
string | Qore::Xml::makeFormattedXMLRPCResponseString (...) |
Serializes the arguments into an XML string formatted for an XML-RPC response with whitespace formatting. More... | |
string | Qore::Xml::makeFormattedXMLRPCResponseStringWithEncoding (string encoding,...) |
Serializes the arguments into an XML string formatted for an XML-RPC response with whitespace formatting and with an explicit output encoding. More... | |
*string | Qore::Xml::makeFormattedXMLRPCValueString (any value, *string encoding) |
Serializes the arguments into an XML string in XML-RPC value format with whitespace formatting but without an XML header. More... | |
string | Qore::Xml::makeXMLRPCCallString (string method,...) |
Serializes the argument into an XML string in XML-RPC call format without whitespace formatting. More... | |
string | Qore::Xml::makeXMLRPCCallStringArgs (string method, any args) |
Serializes the argument into an XML string in XML-RPC call format without whitespace formatting. More... | |
string | Qore::Xml::makeXMLRPCCallStringArgsWithEncoding (string encoding, string method, any args) |
Serializes the argument into an XML string in XML-RPC call format without whitespace formatting with an explicit encoding. More... | |
string | Qore::Xml::makeXMLRPCCallStringWithEncoding (string encoding, string method,...) |
Serializes the argument into an XML string in XML-RPC call format without whitespace formatting with an explicit encoding. More... | |
string | Qore::Xml::makeXMLRPCFaultResponseString (softint code, string msg) |
Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting. More... | |
string | Qore::Xml::makeXMLRPCFaultResponseStringWithEncoding (string encoding, softint code, string msg) |
Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting with an explicit output encoding. More... | |
string | Qore::Xml::makeXMLRPCResponseString (...) |
Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting. More... | |
string | Qore::Xml::makeXMLRPCResponseStringWithEncoding (string encoding,...) |
Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting and with an explicit output encoding. More... | |
*string | Qore::Xml::makeXMLRPCValueString (any value, *string encoding) |
Serializes the arguments into an XML string in XML-RPC value format without whitespace formatting and without an XML header. More... | |
string | Qore::Xml::make_xmlrpc_call (string method, any args, *int flags, *string encoding) |
Serializes the argument into an XML string in XML-RPC call format. More... | |
string | Qore::Xml::make_xmlrpc_fault (softint code, string msg, *int flags, *string encoding) |
Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting. More... | |
string | Qore::Xml::make_xmlrpc_response (any call_args, *int flags, *string encoding) |
Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting. More... | |
*string | Qore::Xml::make_xmlrpc_value (any value, *int flags, *string encoding) |
Serializes the arguments into an XML string in XML-RPC value format without whitespace formatting and without an XML header. More... | |
hash | Qore::Xml::parseXMLRPCCall (string xml, *string encoding) |
Deserializies an XML-RPC call string, returning a Qore data structure representing the call information. More... | |
nothing | Qore::Xml::parseXMLRPCCall () |
This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters. More... | |
hash | Qore::Xml::parseXMLRPCResponse (string xml, *string encoding) |
Deserializies an XML-RPC response string, returning a Qore data structure representing the response information. More... | |
nothing | Qore::Xml::parseXMLRPCResponse () |
This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters. More... | |
any | Qore::Xml::parseXMLRPCValue (string xml, *string encoding) |
Deserializies an XML-RPC value string and returns a Qore data structure representing the information. More... | |
nothing | Qore::Xml::parseXMLRPCValue () |
This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters. More... | |
hash | Qore::Xml::parse_xmlrpc_call (string xml, *string encoding) |
Deserializies an XML-RPC call string, returning a Qore data structure representing the call information. More... | |
hash | Qore::Xml::parse_xmlrpc_response (string xml, *string encoding) |
Deserializies an XML-RPC response string, returning a Qore data structure representing the response information. More... | |
any | Qore::Xml::parse_xmlrpc_value (string xml, *string encoding) |
Deserializies an XML-RPC value string and returns a Qore data structure representing the information. More... | |
auto Qore::Xml::get_xml_value | ( | auto | n | ) |
Helper function returning an XML value.
This function returns the actual value of a complex data structure as returned by parse_xml(). When parsing XML attributes or comments (ex: XPF_ADD_COMMENTS), then a hash is returned and the actual value of the XML appears under the "^value^"
key. This function makes it easier to handle this situation by returning the value given if the argument is not a hash or has no "^value^"
key, otherwise, if so, it returns the value assigned to the "^value^"
key.
Note that only "^value^" is returned even when there are more values as result of XPF_PRESERVE_ORDER flag.
n | a simple value or a complex hash as returned by parse_xml(); if the value is a hash with a "^value^" key, then the value of this key is processed, otherwise the argument itself is processed. If the resulting value is a list or a hash, then nothing is returned, otherwise the value is returned. |
string Qore::Xml::make_xmlrpc_call | ( | string | method, |
any | args, | ||
*int | flags, | ||
*string | encoding | ||
) |
Serializes the argument into an XML string in XML-RPC call format.
method | the method name for the XML-RPC call |
args | a single argument or a list of arguments to the XML-RPC call |
flags | optional formatting flags; see XML Generation Constants for more information |
encoding | an optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::make_xmlrpc_fault | ( | softint | code, |
string | msg, | ||
*int | flags, | ||
*string | encoding | ||
) |
Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting.
code | the fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int) |
msg | the fault message string; the encoding of this argument will define the output encoding of the fault string returned (stored under key 'faultString' as a string) |
flags | optional formatting flags; see XML Generation Constants for more information |
encoding | an optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding |
string Qore::Xml::make_xmlrpc_response | ( | any | call_args, |
*int | flags, | ||
*string | encoding | ||
) |
Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting.
Any top-level arguments to the function will be serialized as the top-level params of the response message
call_args | a single argument or a list of arguments that represent the XML-RPC response |
flags | optional formatting flags; see XML Generation Constants for more information |
encoding | an optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
*string Qore::Xml::make_xmlrpc_value | ( | any | value, |
*int | flags, | ||
*string | encoding | ||
) |
Serializes the arguments into an XML string in XML-RPC value format without whitespace formatting and without an XML header.
value | the value to serialize to XML-RPC format |
encoding | an optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding |
flags | optional formatting flags; see XML Generation Constants for more information |
encoding | an optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeFormattedXMLRPCCallString | ( | string | method, |
... | |||
) |
Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.
method | the method name for the XML-RPC call |
... | additional arguments are serialized according to the default XML-RPC serialization rules |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeFormattedXMLRPCCallStringArgs | ( | string | method, |
any | argv | ||
) |
Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.
method | the method name for the XML-RPC call |
argv | a single argument or a list of arguments to the call |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeFormattedXMLRPCCallStringArgsWithEncoding | ( | string | encoding, |
string | method, | ||
any | argv | ||
) |
Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.
encoding | a string giving the output encoding for the resulting XML string |
method | the method name for the XML-RPC call |
argv | a single argument or a list of arguments to the call |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeFormattedXMLRPCCallStringWithEncoding | ( | string | encoding, |
string | method, | ||
... | |||
) |
Serializes the argument into an XML string in XML-RPC call format with whitespace formatting with an explicit encoding.
encoding | a string giving the output encoding for the resulting XML string |
method | the method name for the XML-RPC call |
Additional arguments are serialized according to the default XML-RPC serialization rules
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeFormattedXMLRPCFaultResponseString | ( | softint | code, |
string | msg | ||
) |
Serializes the argument into an XML string in XML-RPC fault response format with whitespace formatting.
code | the fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int) |
msg | the fault message string; the encoding of this argument will define the output encoding of the fault string returned (stored under key 'faultString' as a string) |
string Qore::Xml::makeFormattedXMLRPCFaultResponseStringWithEncoding | ( | string | encoding, |
softint | code, | ||
string | msg | ||
) |
Serializes the argument into an XML string in XML-RPC fault response format with whitespace formatting with an explicit output encoding.
encoding | a string giving the output encoding for the resulting XML string |
code | the fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int) |
msg | the fault message string (stored under key 'faultString' as a string) |
ENCODING-CONVERSION-ERROR | error converting message string to specified output encoding |
string Qore::Xml::makeFormattedXMLRPCResponseString | ( | ... | ) |
Serializes the arguments into an XML string formatted for an XML-RPC response with whitespace formatting.
... | any top-level arguments to the function will be serialized as the top-level params of the response message |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeFormattedXMLRPCResponseStringWithEncoding | ( | string | encoding, |
... | |||
) |
Serializes the arguments into an XML string formatted for an XML-RPC response with whitespace formatting and with an explicit output encoding.
encoding | a string giving the output encoding for the resulting XML string |
... | any top-level arguments after the first argument will be serialized as the top-level params of the response message |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
*string Qore::Xml::makeFormattedXMLRPCValueString | ( | any | value, |
*string | encoding | ||
) |
Serializes the arguments into an XML string in XML-RPC value format with whitespace formatting but without an XML header.
value | the value to serialize to XML-RPC format |
encoding | an optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeXMLRPCCallString | ( | string | method, |
... | |||
) |
Serializes the argument into an XML string in XML-RPC call format without whitespace formatting.
method | the method name for the XML-RPC call Additional arguments are serialized according to the default XML-RPC serialization rules |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeXMLRPCCallStringArgs | ( | string | method, |
any | args | ||
) |
Serializes the argument into an XML string in XML-RPC call format without whitespace formatting.
method | the method name for the XML-RPC call |
args | a single argument or a list of arguments to the call |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeXMLRPCCallStringArgsWithEncoding | ( | string | encoding, |
string | method, | ||
any | args | ||
) |
Serializes the argument into an XML string in XML-RPC call format without whitespace formatting with an explicit encoding.
encoding | a string giving the output encoding for the resulting XML string |
method | the method name for the XML-RPC call |
args | a single argument or a list of arguments to the call |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeXMLRPCCallStringWithEncoding | ( | string | encoding, |
string | method, | ||
... | |||
) |
Serializes the argument into an XML string in XML-RPC call format without whitespace formatting with an explicit encoding.
encoding | a string giving the output encoding for the resulting XML string |
method | the method name for the XML-RPC call |
Additional arguments are serialized according to the default XML-RPC serialization rules
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeXMLRPCFaultResponseString | ( | softint | code, |
string | msg | ||
) |
Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting.
code | the fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int) |
msg | the fault message string; the encoding of this argument will define the output encoding of the fault string returned (stored under key 'faultString' as a string) |
string Qore::Xml::makeXMLRPCFaultResponseStringWithEncoding | ( | string | encoding, |
softint | code, | ||
string | msg | ||
) |
Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting with an explicit output encoding.
encoding | a string giving the output encoding for the resulting XML string |
code | the fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int) |
msg | the fault message string (stored under key 'faultString' as a string) |
ENCODING-CONVERSION-ERROR | error converting message string to specified output encoding |
string Qore::Xml::makeXMLRPCResponseString | ( | ... | ) |
Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting.
Any top-level arguments to the function will be serialized as the top-level params of the response message
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
string Qore::Xml::makeXMLRPCResponseStringWithEncoding | ( | string | encoding, |
... | |||
) |
Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting and with an explicit output encoding.
encoding | a string giving the output encoding for the resulting XML string Any top-level arguments after the first argument will be serialized as the top-level params of the response message |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
*string Qore::Xml::makeXMLRPCValueString | ( | any | value, |
*string | encoding | ||
) |
Serializes the arguments into an XML string in XML-RPC value format without whitespace formatting and without an XML header.
value | the value to serialize to XML-RPC format |
encoding | an optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding |
XMLRPC-SERIALIZATION-ERROR | empty member name in hash or cannot serialize type to XML-RPC (ex: object) |
hash Qore::Xml::parse_xmlrpc_call | ( | string | xml, |
*string | encoding | ||
) |
Deserializies an XML-RPC call string, returning a Qore data structure representing the call information.
xml | the XML string in XML-RPC call format to deserialize |
encoding | an optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding |
methodName:
the name of the method being calledparams:
the arguments to the methodPARSE-XMLRPC-CALL-ERROR | missing 'methodCall' or 'methodName' element or other syntax error |
PARSE-XMLRPC-ERROR | syntax error parsing XML-RPC string |
hash Qore::Xml::parse_xmlrpc_response | ( | string | xml, |
*string | encoding | ||
) |
Deserializies an XML-RPC response string, returning a Qore data structure representing the response information.
xml | the XML string in XML-RPC call format to deserialize |
encoding | an optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding |
fault:
a hash describing a fault responseparams:
a hash describing a normal, non-fault responsePARSE-XMLRPC-RESPONSE-ERROR | missing required element or other syntax error |
PARSE-XMLRPC-ERROR | syntax error parsing XML-RPC string |
any Qore::Xml::parse_xmlrpc_value | ( | string | xml, |
*string | encoding | ||
) |
Deserializies an XML-RPC value string and returns a Qore data structure representing the information.
xml | the XML string in XML-RPC value format to deserialize |
encoding | an optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding |
PARSE-XMLRPC-ERROR | syntax error parsing XML-RPC string |
nothing Qore::Xml::parseXMLRPCCall | ( | ) |
This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.
hash Qore::Xml::parseXMLRPCCall | ( | string | xml, |
*string | encoding | ||
) |
Deserializies an XML-RPC call string, returning a Qore data structure representing the call information.
xml | the XML string in XML-RPC call format to deserialize |
encoding | an optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding |
methodName:
the name of the method being calledparams:
the arguments to the methodPARSE-XMLRPC-CALL-ERROR | missing 'methodCall' or 'methodName' element or other syntax error |
PARSE-XMLRPC-ERROR | syntax error parsing XML-RPC string |
nothing Qore::Xml::parseXMLRPCResponse | ( | ) |
This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.
hash Qore::Xml::parseXMLRPCResponse | ( | string | xml, |
*string | encoding | ||
) |
Deserializies an XML-RPC response string, returning a Qore data structure representing the response information.
xml | the XML string in XML-RPC call format to deserialize |
encoding | an optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding |
fault:
a hash describing a fault responseparams:
a hash describing a normal, non-fault responsePARSE-XMLRPC-RESPONSE-ERROR | missing required element or other syntax error |
PARSE-XMLRPC-ERROR | syntax error parsing XML-RPC string |
nothing Qore::Xml::parseXMLRPCValue | ( | ) |
This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.
any Qore::Xml::parseXMLRPCValue | ( | string | xml, |
*string | encoding | ||
) |
Deserializies an XML-RPC value string and returns a Qore data structure representing the information.
xml | the XML string in XML-RPC value format to deserialize |
encoding | an optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding |
PARSE-XMLRPC-ERROR | syntax error parsing XML-RPC string |