Browse Prior Art Database

Generating Hierarchical XML Data from a Flat (Non-Hierarchical) Data Source

IP.com Disclosure Number: IPCOM000015234D
Original Publication Date: 2001-Nov-01
Included in the Prior Art Database: 2003-Jun-20
Document File: 3 page(s) / 44K

Publishing Venue

IBM

Abstract

Disclosed is a data processing technique which allows generation of "reusable, application independent and hierarchical data" in the Extensible Markup Language (XML) format from a non-hierarchical (flat) data source by imposing constraints upon the naming of data source fields.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 58% of the total text.

Page 1 of 3

Generating Hierarchical XML Data from a Flat (Non-Hierarchical) Data Source

Disclosed is a data processing technique which allows generation of "reusable, application independent and hierarchical data" in the Extensible Markup Language (XML) format from a non-hierarchical (flat) data source by imposing constraints upon the naming of data source fields.

When a data source cannot provide hierarchical data to an application (for example, a Lotus Notes** document), this technique allows the application to convert the non-hierarchical data into a hierarchical XML representation. Having the hierarchical XML data allows an application to perform powerful processing of data using languages such as XPATH, a W3C® (World Wide Web Consortium) recommendation used by the Extensible Stylesheet Language (XSL*) to refer to elements of an XML hierarchy. Utilising XPATH ultimately allows an application to take advantage of the looping constructs of XSL Transformations (XSLT) to transform hierarchical XML into other formats such as Hypertext Markup Language (HTML), Wireless Markup Language (WML), XML, plain text, etc. The XSLT documents required to process hierarchical XML are much simpler, powerful and flexible than that required to directly process non-hierarchical XML.

This technique addresses the problem of having non-hierarchical data by imposing naming constraints upon the source data via a combination of underscores and sequential numbering. Consider the following simple example, in which there are four source data fields named: PERSON_1_NAME_FIRST, PERSON_1_NAME_LAST, PERSON_2_NAME_FIRST and PERSON_2_NAME_LAST. Applying the technique would generate the following hierarchical XML:

<?xml version="1.0"?>

<DOCUMENT>

<PERSON_LIST>

<PERSON>

<NAME>

<FIRST>Nicholas</FIRST>

<LAST>Campbell</LAST>

</NAME>

</PERSON>

<PERSON>

<NAME>

<FIRST>Damien</FIRST>

<LAST>Campbell</LAST>

</NAME>

</PERSON>

</PERSON_LIST>

1

Page 2 of 3

</DOCUMENT>

This hierarchical XML may then be processed with XSLT as per the following example which generates a list of first names.

<xsl:for-each select="/DOCUMENT/PERSON_LIST/PERSON[NAME/LAST='Campbell']">...