Can not load full XML document.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Can not load full XML document.

DojoNovice
This post has NOT been accepted by the mailing list yet.
Can not load full XML document. It parses only first row. What is wrong?

Here is my code:

<!DOCTYPE html>
<html>
  <head>
    <title>dojox/grid/DataGrid with XML</title>
    <meta charset="utf-8"/>
    <link rel="StyleSheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dijit/themes/claro/claro.css"/>
    <link rel="StyleSheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojox/grid/resources/claroGrid.css"/>
    <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad:true, async:1"></script>
  </head>

  <body class="claro">
    <article data-dojo-type="dojox.data.XmlStore" data-dojo-props="url : 'data.xml', rootItem: 'data'" data-dojo-id="display">
    </article>
                                                   
   
Column 1Column 2
 

    <script> require(["dojo", "dojo/parser", "dojox/data/XmlStore", "dojox/grid/DataGrid"], function(dojo) { dojo.ready(function() { }); }); </script>  </body>
</html>

XML Document:

<?xml version="1.0" encoding="UTF-8" ?>
<data>
        <field>
                <field1>Data1</field1>
                <field2>Data2</field2>
        </field>
        <field>
                <field1>Data3</field1>
                <field2>Data4</field2>
        </field>
        <field>
                <field1>Data5</field1>
                <field2>Data6</field2>
        </field>
</data>