:: Documentation >>

XML data

Lets look how to load simple XML data into the grid.

Here is the XML (click to open):

        <name>Microsoft Corporation</name>
        <name>Oracle Corporation</name>

To load and transform XML data you need an XML table model.

var table = new Active.XML.Table;

Assign a URL of the XML file.

table.setProperty("URL", "/examples/data/companies-simple.xml");

By default the model looks at the documentElement as the data root. Then all child elements of the root are treated as rows and the child elements of each row node become the table cells. Exactly as this simple example looks like.

Just load the file.


After the grid object is created

var obj = new Active.Controls.Grid;
obj.setProperty("column/count", 5);

it is assigned our new external data model.

obj.setModel("data", table);

And finally write the grid HTML to the page.



Editable date fields from an XML file... German (1)
Dynamically Adding a row to a table Vernon (1)
Take tag attributes as columns Arturo Guerrero (2)
XML data load... Yossi (6)
ADO.Recordset Kevin (1)
ActiveWidgets grid with / con PHP (5)
Is there any way to save this data to disk? Paul R. (3)
implement this feature in jsp and deploy in tomcat 15383 (0)
Can I load data from a spreadsheet? Suresh (1)
XML data from a servlet ? (1)
Call on an Event Nihar (0)
Empty XML tags (<N/>) are not parsed in FireFox Meindert Hoving (2)
[no subject] vernon (2)
XML OUTPUT panduran (0)
What could be wrong with this way of loading from XML file? Equinoxe (0)
XML input Anitha (6)
XML DOM loading Ravi (3)
Data Load Manvi (0)
Are there limitations on the XML string length? Mikhail (1)


Recent changes:

2.5.0 - 2.5.6
2.5.0 - 2.5.5