Hi
this is very frustrating, i've been trying for quite a while. I m trying to display a set of data in a Grid, the data is retrieved from a Servlet. What the Servlet does is to access the Database, find the object, and what i do here is to use Castor to convert the Java Object into XML, and transfer back to the client.

the original XML is like this:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xflow-location>
    <location>
        <document>
            <page>
                <datacell>
                    <pk_datacell_id>1</pk_datacell_id>
                    <last_updated>2009-02-10T11:21:28.000+11:00</last_updated>
                    <datacell_name>Consignment</datacell_name>
                    <datacell_value>SL140660</datacell_value>
                </datacell>
                <datacell>
                    <pk_datacell_id>2</pk_datacell_id>
                    <last_updated>2009-02-10T11:21:28.000+11:00</last_updated>
                    <datacell_name>customer_ref</datacell_name>
                    <datacell_value>948272</datacell_value>
                </datacell>
                <datacell>
                    <pk_datacell_id>3</pk_datacell_id>
                    <last_updated>2009-02-10T11:21:58.000+11:00</last_updated>
                    <datacell_name>Job</datacell_name>
                    <datacell_value>5454</datacell_value>
                </datacell>
            </page>
            <page>
                <datacell>
                    <pk_datacell_id>4</pk_datacell_id>
                    <last_updated>2009-02-10T11:21:58.000+11:00</last_updated>
                    <datacell_name>Invoice_num</datacell_name>
                    <datacell_value>94827223323</datacell_value>
                </datacell>
            </page>
        </document>
    </location>
</xflow-location>
I want to display this in a grid like:

Code:
document id        Consignment              invoice num            Job            customer ref
1                  SL140660                  94827223323          5454          948272
in the original XML, this info is contained in several rows, now i want to get them displayed within one row, datacell_name content text is the column name, and datacell_value content text is the column value, and rows are differentiated by the parent node, which is the document node(one Location will have lots of documents) in this case.

can anyone help or even give me a bit hints, it will be sincerely appreciated!

Thank you!!!

Best regards