PSF for z/OS: User's Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


XML data

PSF for z/OS: User's Guide
S550-0435-04

XML data

This topic is intended to help you understand how PSF processes XML data. For a description of XML, see Extensible Markup Language (XML) 1.0 on the World Wide Web Consortium website at http://www.w3.org

The XML Descriptor structured field (XMD) contains information such as data position, text orientation, font selection, field selection, and conditional processing identification. It is used to format XML data, which consists of information delimited by start and end tags. To process XML data, PSF builds a Qualified Tag by concatenating XML start tags. PSF then compares these Qualified Tags to Qualified Tags in the Data Map. PSF builds Qualified Tags for each XMD in the Data Map by concatenating the separate XML Name triplets specified on each XMD. A separate XML Name triplet is specified on an XMD for each XML Start tag that must be traversed in order to process the content of an XML element.

If an XMD with a matching Qualified Tag is found, the content of the XML element is formatted with that XMD. If an XMD with a matching Qualified Tag is not found, processing resumes with the next start tag. Note that as PSF parses the XML, it must buffer the XML start tags traversed in order to have a "current" Qualified Tag. Each time an end tag is found, the last matching start tag is removed. Consider this XML hierarchy:

<person>
 <name>
  <first>John</first>
  <last>Doe</last>
 </name>
</person>

The Qualified Tag for the element <first> is {person name first}. To process this "current" Qualified Tag, PSF looks for an XMD in the Data Map that has the same Qualified Tag. If found, that XMD is used to present the XML element content John on the page. PSF then repeats the process by building a Qualified Tag for the next start tag, <last>, which becomes the new "current" Qualified Tag. The Qualified Tag for last is {person name last}. Notice that the tag for element <first> was removed since its end was received before the start tag for element <last>.

The processing described in this topic is similar to the way the 10-byte record identifier is used for record format line data. After PSF determines which XMD is needed to process the XML element content, the processing is nearly identical to record format processing. For more information about formatting XML data, see Advanced Function Presentation: Programming Guide and Line Data Reference, S544-3884.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014