IBM FileNet P8, Version 5.2.1            

Funkcije XML

Ta razdelek vsebuje seznam funkcij XML in kratek opis vsake funkcije.

Tabela 1. Tabela funkcij XML in njeni opisi
Funkcija Kaj naredi
is_wellformed Prejme nizovni izraz in preveri, ali je dobro oblikovan XML.
xmlencode Polje XML pretvori v nizovni izraz.
xmldecode Nizovni izraz pretvori v XML.

is_wellformed

Preveri, ali je nizovni izraz skladenjsko pravilen XML. Vrne true (logično vrednost), če je izhoden niz dobro oblikovan XML. Pomnite, da je polje XML mogoče uporabiti za izdelavo nizovnih izrazov.

Uporabite naslednjo skladnjo:
is_wellformed (string_expr)
kjer je string_expr ali nizovni izraz ali polje XML.

xmlencode

Pretvori iz XML v standarden nizovni format ter prekodira vse posebne znake XML. Nastali niz je mogoče uporabiti v sporočilu XML.

Uporabite naslednjo skladnjo:
xmlencode (string_expr)
kjer je string_expr ali nizovni izraz ali polje XML.

V spodnjem primeru je string_expr podatkovno polje XML z vrednostjo, prikazano pod format XML. Rezultat je nizovni format.

Tabela 2. Tabela formata XML in nastali format niza
Format XML Nizovni 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>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by FileNET Corp. (FileNET Corp.) --&gt;&#10;&lt;xs:schema attributeFormDefault=&quot;unqualified&quot;&#10; elementFormDefault=&quot;qualified&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;&#10; &lt;xs:element name=&quot;VehicleReply&quot;&gt;&#10; &lt;xs:annotation&gt;&#10; &lt;xs:documentation&gt;Root&lt;/xs:documentation&gt;&#10; &lt;/xs:annotation&gt;&#10; &lt;xs:complexType&gt;&#10; &lt;xs:sequence&gt;&#10; &lt;xs:element name=&quot;Owner_reply&quot; type=&quot;xs:string&quot;/&gt;&#10; &lt;xs:element name=&quot;VIN_reply&quot; type=&quot;xs:string&quot;/&gt;&#10; &lt;xs:element name=&quot;RegNumber_reply&quot; type=&quot;xs:string&quot;/&gt;&#10; &lt;xs:element name=&quot;RegFee_reply&quot; type=&quot;xs:float&quot;/&gt;&#10; &lt;/xs:sequence&gt;&#10; &lt;/xs:complexType&gt;&#10; &lt;/xs:element&gt;&#10;&lt;/xs:schema&gt;

xmldecode

Nizovni izraz pretvori v format XML.

Uporabite naslednjo skladnjo:
xmldecode (string_expr)
kjer je string_expr ali nizovni izraz ali polje XML.


Last updated: March 2016
bpfe014.htm

© Copyright IBM Corp. 2016.