skip to main content

Procedure Division Statements : XML GENERATE

XML GENERATE
The XML GENERATE statement converts data to XML format.
General Format
XML GENERATE Xml-Stream FROM Xml-Data
    [ COUNT IN Counter ]
    [ ON EXCEPTION Imperative-Statement-1 ]
    [ NOT ON EXCEPTION Imperative-Statement-2 ]
[END-XML]
Syntax Rules
1.
2.
3.
General Rules
1.
2.
3.
4.
o
o
Examples
Generate an XML structure from a data structure
working-storage section.
 01 my-html.
    05 my-head  pic x(10value "first".
    05 my-body.
       10 my-paragraph pic x(20value "paragraph 1".
       10 my-table.
             20 my-col-1 pic x(20value "col 1"
             20 my-col-2 pic x(20value "col 2"
             20 my-col-1 pic x(20value "col 1"
             20 my-col-2 pic x(20value "col 2"
 01 the-xml  pic x any length.
 procedure division.
  xml generate the-xml from my-html
  end-xml
  display the-xml.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left