This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
SAX GET XML CDATA
|
SAX GET XML CDATA ( document ; value ) | ||||||||
Parameter | Type | Description | ||||||
document | DocRef |
![]() |
Reference of open document | |||||
value | Text, BLOB |
![]() |
Element value | |||||
The SAX GET XML CDATA command gets 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).
Compatibility note: Starting with 4D v12, CDATA contents encoded in base64 are automatically decoded by the SAX GET XML CDATA command, so it is not necessary to call the BASE64 DECODE command.
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)
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.
Product: 4D
Theme: XML SAX
Number:
878
Modified: 4D v11 SQL Release 3
4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)