Difference between revisions of "Basic XML Writer"

From PresenceWiki
Jump to: navigation, search
 
Line 3: Line 3:
 
The Basic XML Writer Node converts the current Data Table into a basic XML structure as follows:
 
The Basic XML Writer Node converts the current Data Table into a basic XML structure as follows:
  
Incoming data table example:
+
Based on the following input Data Table:
  
Outgoing XML example:
+
{| border="1" cellspacing="0" cellpadding="5" align="center"
 +
! Name
 +
! Area
 +
|-
 +
| Basil Prescott
 +
| London
 +
|-
 +
| Roland "Mac" MacDonald
 +
| Florida
 +
|-
 +
|}
  
 +
This would be the expected output:
  
 
  <?xml version="1.0"?>
 
  <?xml version="1.0"?>
 
  <presence-recordset task="Demo Task" node="10">
 
  <presence-recordset task="Demo Task" node="10">
 
  <row number="1">
 
  <row number="1">
  <column field-name="CUSTOMERID" data-type="INTEGER">4889</column>
+
  <column field-name="NAME" data-type="STRING">Basil Prescott</column>
 +
<column field-name="AREA" data-type="STRING">London</column>
 +
  </row>
 +
<row number="2">
 +
<column field-name="NAME" data-type="STRING">Roland "Mac" MacDonald</column>
 +
<column field-name="AREA" data-type="STRING">Florida</column>
 +
  </row>
 +
</presence-recordset>
 +
 
 +
=== Options ===
 +
 
 +
The options provided are standard for Basic Data Writers:
 +
 
 +
* Include all columns in output data OR
 +
* Include selected columns
 +
 
 +
All Element and Attribute names are configurable. To change them from the defaults, click on the "Basic XML Writer Options" button, and you will be presented with the following properties tree:
 +
 
 +
 
 +
http://www.international-presence.com/wikidocs/images/xml_writer_options.png
 +
 
 +
Here are the items, what they represent, and their defaults:
 +
 
 +
* Column Name Attribute: &lt;column '''field-name'''="AREA"&gt;
 +
* Column Tag Name:  &lt;'''column''' field-name="AREA"&gt;
 +
* Document Element Name: &lt;'''presence-recordset''' task="Demo Task" node="10"&gt;
 +
* Node Attribute Name: &lt;presence-recordset task="Demo Task" '''node'''="10"&gt;
 +
* Number Attribute Name: &lt;row '''number'''="1"&gt;
 +
* Row Tag Name: &lt;'''row''' number="1"&gt;
 +
* Task Attribute Name: &lt;presence-recordset '''task'''="Demo Task" node="10"&gt;
 +
* Type Attribute Name: &lt;column field-name="NAME" '''data-type'''="STRING"&gt;

Revision as of 15:46, 19 January 2010

Basic XML Writer

The Basic XML Writer Node converts the current Data Table into a basic XML structure as follows:

Based on the following input Data Table:

Name Area
Basil Prescott London
Roland "Mac" MacDonald Florida

This would be the expected output:

<?xml version="1.0"?>
<presence-recordset task="Demo Task" node="10">
	<row number="1">
		<column field-name="NAME" data-type="STRING">Basil Prescott</column>
		<column field-name="AREA" data-type="STRING">London</column>
 	</row>
	<row number="2">
		<column field-name="NAME" data-type="STRING">Roland "Mac" MacDonald</column>
		<column field-name="AREA" data-type="STRING">Florida</column>
 	</row>
</presence-recordset>

Options

The options provided are standard for Basic Data Writers:

  • Include all columns in output data OR
  • Include selected columns

All Element and Attribute names are configurable. To change them from the defaults, click on the "Basic XML Writer Options" button, and you will be presented with the following properties tree:


http://www.international-presence.com/wikidocs/images/xml_writer_options.png

Here are the items, what they represent, and their defaults:

  • Column Name Attribute: <column field-name="AREA">
  • Column Tag Name: <column field-name="AREA">
  • Document Element Name: <presence-recordset task="Demo Task" node="10">
  • Node Attribute Name: <presence-recordset task="Demo Task" node="10">
  • Number Attribute Name: <row number="1">
  • Row Tag Name: <row number="1">
  • Task Attribute Name: <presence-recordset task="Demo Task" node="10">
  • Type Attribute Name: <column field-name="NAME" data-type="STRING">