hi all,
I m working on a project, and found that i need to convert columns to rows
otherwise the next step wouldn't work properly.

My original xml is like:
-------------------------------------------------------------------------------
<?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 make it:

------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xflow-location>
    <location>
        <document>
            <pkid>1</pkid>
            <Consignment>SL140660</Consignment>
            <customer_re>948272</customer_re>
            <Job>5454</Job>
            <Invoice_num>94827223323</Invoice_num>
        </document>
        <document>
            <pkid>1</pkid>
            <Consignment>SL140660</Consignment>
            <customer_re>948272</customer_re>
            <Job>5454</Job>
            <Invoice_num>94827223323</Invoice_num>
        </document>
    </location>
</xflow-location>
-----------------------------------------------------------------------------
the convertion is generally grab all the datacell_name text content, make
them the node names,  and make all datacell_value the new content text. This
is just to turn lots of datacells into a row of datacell with different
column names.

has anyone tried and succeeded to do this? please help! thank you!

best regards

-- 
View this message in context: 
http://www.nabble.com/can-castor-convert-columns-to-rows--tp21969650p21969650.html
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to