SAX GET XML CDATA

4D - Documentation   Français   English   German   Spanish   Japanese   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11.3 (Modified)


SAX GET XML CDATA (document; value)

ParameterTypeDescription
documentDocRefReference of open document
valueText | BLOBElement value

Description

The SAX GET XML CDATA command allows you to get the CDATA value of an XML element that exists in the XML document referenced in the document parameter. This command must be called with the XML CDATA SAX event. For more information about SAX events, refer to the description of the SAX Get XML node command.

Pass a value variable of the Text type if you want to retrieve data having a size greater than 32 KB (the database must be running in Unicode mode).

Data is returned as is (it is not modified).

Example

Let's look at the following piece of XML code:

<RootElement>
   <Child>MyText<![CDATA[MyCData]]</Child>
</RootElement>

The following 4D code will return "MyCData" in vTextData:

   C_BLOB (vData)
   C_TEXT (vTextData)
   SAX GET XML CDATA(DocRef;vData)
   vTextData:=BLOB to text(vData;UTF8 C string)

See Also

SAX ADD XML CDATA, SAX Get XML node.

System Variables or Sets

If the command has been executed correctly, the system variable OK is set to 1. Otherwise, it is set to 0 and an error is generated.


4D - Documentation   Français   English   German   Spanish   Japanese   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next