Function | What it does |
---|---|
Takes a string expression and checks that it is well formed xml. | |
xmlencode | Converts an XML field to a string expression. |
xmldecode | Converts a string expression to XML. |
Checks that a string expression is syntactically correct XML. Returns true (Boolean) if the resulting string is well formed XML. Note that an XML field can be used to create string expressions.
Use the following syntax:
is_wellformed (string_expr)
where: |
string_expr |
is either a string expression or an xml field |
Converts from XML to standard string format, encoding all the XML special characters. The resulting string can be used as a string in an XML message.
Use the following syntax:
xmlencode (string_expr)
where: |
string_expr |
is either a string expression or an xml field |
In the example below, string_expr is an XML data field with the value shown under XML format. The string format is the result.
XML format | String format |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by FileNET Corp. (FileNET Corp.) --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="VehicleReply"> <xs:annotation> <xs:documentation>Root</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="Owner_reply" type="xs:string"/> <xs:element name="VIN_reply" type="xs:string"/> <xs:element name="RegNumber_reply" type="xs:string"/> <xs:element name="RegFee_reply" type="xs:float"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> |
<?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by FileNET Corp. (FileNET Corp.) --> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="VehicleReply"> <xs:annotation> <xs:documentation>Root</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="Owner_reply" type="xs:string"/> <xs:element name="VIN_reply" type="xs:string"/> <xs:element name="RegNumber_reply" type="xs:string"/> <xs:element name="RegFee_reply" type="xs:float"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> |
Converts from string format to XML format.
Use the following syntax:
xmldecode (string_expr)
where: |
string_expr |
is either a string expression or an xml field |