:: Documentation >>

table

Specifies the XPath expression for the table root element.

The default table XPath is "*" - selecting document root element. Use setTable(xpath) method if the required data section is located somewhere else in the document.

Syntax

var value = obj.getTable(); 
obj.setTable(value);        

Examples

The following example shows how to select one section of the complex master-detail document.

<xml id="data">
    <orders>
        <order id="121"></order>
        <order id="122"></order>
        <order id="123">
            <item>
                <product>BlueWidget</product>
                <price>123.00</price>
                <qty>1</qty>
            </item>
            <item>
                <product>RedWidget</product>
                <price>456.00</price>
                <qty>10</qty>
            </item>
        </order>
    </orders>
</xml>

<script>

    var table = new AW.XML.Table;
    table.setTable("//order[@id=123]"); // set table node XPath
    table.setXML(document.getElementById("data"));

    var obj = new AW.UI.Grid;
    obj.setCellModel(table);
    obj.setColumnCount(3);
    obj.setRowCount(2);
    document.write(obj);

</script>

See also

Set rows, columns XPath

Comments

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5