24.03.2013 Views

OpenEdge Development: Working with XML - Product ...

OpenEdge Development: Working with XML - Product ...

OpenEdge Development: Working with XML - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Developing <strong>with</strong> <strong>XML</strong> in <strong>OpenEdge</strong><br />

Serializing ABL temp-tables and ProDataSets to and<br />

from <strong>XML</strong><br />

1–10<br />

ABL temp-tables and ProDataSets have the ability to serialize their data to an <strong>XML</strong> document<br />

and serialize their definitions to <strong>XML</strong> Schema documents. Similarly, you can read <strong>XML</strong> data,<br />

load schema, or both into a temp-table or ProDataSet.<br />

You can consider the DOM and SAX features of ABL as direct manipulation of <strong>XML</strong>. Note that<br />

you must understand <strong>XML</strong> to use these features. By contrast, the temp-table and ProDataSet<br />

serialization features are convenience features that protect the developer from needing to know<br />

much about <strong>XML</strong> or accessing <strong>XML</strong> <strong>with</strong> ABL. On the other hand, the advanced abilities of<br />

these features can be used by knowledgeable <strong>XML</strong> developers for advanced use cases.<br />

Features<br />

The <strong>XML</strong> features of temp-tables and ProDataSets allow you to take advantage of their rich<br />

relational features while providing a standards-based method for sharing data and schema <strong>with</strong><br />

application partners. These <strong>XML</strong> features include the following:<br />

• Load <strong>XML</strong> Schema to create an empty temp-table or ProDataSet.<br />

• Read <strong>XML</strong> data, <strong>XML</strong> Schema, or both to populate an empty temp-table or ProDataSet.<br />

• Read <strong>XML</strong> data, <strong>XML</strong> Schema, or both into temp-tables and ProdataSets that already<br />

contain data and schema.<br />

• Write <strong>XML</strong> data, <strong>XML</strong> Schema, or both from a temp-table or ProDataSet to <strong>XML</strong><br />

documents.<br />

• Perform round-trip <strong>XML</strong> write/reads. A round trip is an <strong>XML</strong> write of data during one<br />

session followed by an <strong>XML</strong> read in another session. For example, suppose your<br />

application needs to write data as <strong>XML</strong> to the file system when the user does not have a<br />

network connection. When the connection is established, your application can check for<br />

<strong>XML</strong> data files and read them back in.<br />

The <strong>XML</strong> features are available as attributes and methods on:<br />

• Temp-table objects<br />

• Temp-table buffer objects (acts on the entire temp-table, not just the current buffer<br />

contents))<br />

• ProDataSet objects

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!