This section contains a list of functions and the return values of the appropriate type from an XML string. The XML string can be stored in an XML data field or in a string data field.
Function | What it does |
---|---|
xmlbooleanexpr | Evaluates a Boolean XPath expression. |
xmlintegerexpr | Evaluates an integer XPath expression. |
xmlfloatexpr | Evaluates a float XPath expression. |
xmlstringexpr | Evaluates a string XPath expression. |
xmlstringarrayexpr | Evaluates a string array XPath expression. |
The following functions manipulate an XML string
Function | What it does |
---|---|
xmlinsertbefore | Inserts an XML string into a source XML string before a particular node. |
xmlinsertafter | Inserts an XML string into a source XML string after a particular node. |
xmlinsertchildfirst | Inserts an XML string into a source XML string as the first child of a particular node. |
xmlinsertchildlast | Inserts an XML string into a source XML string as the last child of a particular node. |
xmlremove | Removes a node from an XML string. |
xmlrename | Renames a node in an XML string. |
xmltransform | Transforms an XML string using the specified style sheet. |
Returns the result of a Boolean XPath expression.
xmlbooleanexpr (src, context, xpath_expr)
where:Parameter | Description |
---|---|
src | The source XML string |
context | String containing an XPath expression |
xpath_expr | String containing a Boolean XPath expression value |
Returns the result of an integer XPath expression
xmlintegerexpr (src, context, xpath_expr)
where:Parameter | Description |
---|---|
src | The source XML string |
context | String containing an XPath expression |
xpath_expr | String containing an integer XPath expression value |
Returns the result of a float XPath expression.
xmlfloatexpr (src, context, xpath_expr)
where:Parameter | Description |
---|---|
src | The source XML string |
context | String containing an XPath expression |
xpath_expr | String containing a float XPath expression value |
Returns the result of a string XPath expression.
xmlstringexpr (src, context, xpath_expr)
where:Parameter | Description |
---|---|
src | The source XML string |
context | String containing an XPath expression |
xpath_expr | String containing a string XPath expression value |
Returns the result of a string array XPath expression.
xmlstringarrayexpr (src, context, xpath_expr)
where:Parameter | Description |
---|---|
src | The source XML string |
context | String containing an XPath expression |
xpath_expr | String containing a string array XPath expression value |
Inserts a string before a particular XPath expression
xmlinsertbefore (src, context, xpath_expr, token)
where:Parameter | Description |
---|---|
src | The source XML string |
context | The location path from src to start the xpath_expr evaluation. |
xpath_expr | String returning a single node of src where token will be inserted |
token | String to be inserted before the node returned by xpath_expr |
Inserts a string after a particular XPath expression
xmlinsertafter (src, context, xpath_expr, token)
where:Parameter | Description |
---|---|
src | The source XML string |
context | The location path from src to start the xpath_expr evaluation. |
xpath_expr | String returning a single node of src where token will be inserted |
token | String to be inserted after the node returned by xpath_expr |
Inserts a string as a first child node of the returned node.
xmlinsertchildfirst (src, context, xpath_expr, token)
where:Parameter | Description |
---|---|
src | The source XML string |
context | The location path from src to start the xpath_expr evaluation. |
xpath_expr | String returning a single node of src where token will be inserted |
token | String to be inserted as the first child node of the node returned by xpath_expr |
Inserts a string as the last child node of the returned node.
xmlinsertchildlast (src, context, xpath_expr, token)
where:Parameter | Description |
---|---|
src | The source XML string |
context | The location path from src to start the xpath_expr evaluation. |
xpath_expr | String returning a single node of src where token will be inserted |
token | The string to be inserted as the last child node of the node returned by xpath_expr |
Removes the node returned by xpath_expr.
xmlremove (src, context, xpath_expr)
where:Parameter | Description |
---|---|
src | The source XML string |
context | The location path from src to start the xpath_expr evaluation. |
xpath_expr | The string to be removed |
Renames the node returned by the xpath_expr to new_name. The context is the location path from src to start the xpath_expr evaluation.
xmlrename (src, context, xpath_expr, new_name)
where:Parameter | Description |
---|---|
src | The source XML string |
context | The location path from src to start the xpath_expr evaluation |
xpath_expr | Node to be renamed |
new_name | The new name of the node |
Returns the transformation of the <src> parameter based on the style sheet. The style sheet must be an XSLT style sheet. Note that no Java™ code is supported in the style-sheet.
xmltransform (src, style-sheet)
where:Parameter | Description |
---|---|
src | The source XML string |
style-sheet | A string expression containing either an XSLT style sheet or the filename of an XSLT style sheet. If it is a filename, the file must reside in the <PE Install Dir>/data/pesvr.<virtualserver>/xsl directory (<PE Install Dir>\data\pesvr.<virtualsdrver>\xsl in Windows) or a subdirectory. |