Difference: 0LASubrXmlWriterAddData ( vs. 1)

Revision 12022-05-25 - MisaghKarimi

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="0LASubrXmlWriterElemStart"

.XML WRITER ADD DATA

This subroutine adds data to the most recent opened element in the given XML file. Added in 6.2.0


Usage:

      PASS         <XML_stream_name>          FIELD            SHARE? N
      PASS         <XML_data>                 FIELD            SHARE? N
      PASS         <XML_data_len>             FIELD            SHARE? N
      PASS         <XML_data_format>          FIELD            SHARE? N
      GOSUB    --- .XML WRITER ADD DATA   
* Check for errors
IF --- .XML WRITER ADD DATA NE

Description:

This subroutine adds data to the most recent opened element in an XML file. You can run this subroutine multiple times to add more data to your file.

<XML_stream_name> is the name of XML stream that has been assigned during .XML WRITER OPEN api. This field is required and cannot be more than 22 characters.

<XML_data> is the data you want to write to your XML file. This parameter is required and cannot be more than 32767 (32k) characters.

<XML_data_len> is the length of data from position 1 of the XML_data field that is going to be written to the XML file. This is an optional parameter and if not passed, all the data in XML_data will be written to the XML file. This parameter also can be used to force Appx to write trailing spaces to the XML file. The value of this field cannot be larger than 32767.

<XML_data_format> specifies format of the data. This field is optional and can have one of following values:

  • STRING: This tells Appx that it needs to escape the data before writing it to the XML file. This is the default value if not passed.
  • RAW: This tells Appx that the data is already escaped and write it as is.
  • CDATA: This tells Appx to wrap the data in cdata tag before writing it to the xml file (<![CDATA[ XML_data ]]>)
You can check the value of --- .XML WRITER ADD DATA field after the api call to check for errors.

See also . XML WRITER ADD ATTR

Comments:

Read what other users have said about this page or add your own comments.


<--/commentPlugin-->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback