|
|||||||||||||||||
|
|
It is often useful to store an XML fragment in a relational database text field. The Encoding/Decoding is applied to one or multiple elements by specifying the canonical XPath target in the operator. SQLEncodeElement
ExampleFor a source document var:source <root>
<a> <b>text</b> </a> </root> Element /root/a is encoded with... <instr>
<type>SQLEncodeElement</type> <operand>var:source</operand> <operator> <xpath>/root/a</xpath> </operator> <target>var:encoded</target> </instr> Producing the encoded document... <root>
<a> &lt;a&gt; &lt;b&gt;text&lt;/b&gt; &lt;/a&gt; </a> </root> SQLDecodeElement
ExampleThe encoded document above is decoded with <instr>
<type>SQLDecodeElement</type> <operand>var:encoded</operand> <operator> <xpath>/root/a</xpath> </operator> <target>var:decoded</target> </instr> Producing the original <root>
<a> <b>text</b> </a> </root>
|
||||||||||||||||
|
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited
|
|||||||||||||||||