Hi, I am developing with C# .Net 4 and Sybase Adaptive Server Enterprise Edition 15.5.

I need to export and import large nested hierarchical XML files from/into Sybase ASE 15.5.

I was hoping to use something like Ms SQL Server's 'FOR XML' query which can extract nested XML very easily and very fast. Sybase does have the 'FOR XML' functionality but it only allows the selecting of one dimensional XML. What is the best means of exporting nested XML from Sybase Adaptive Server Enterprise edition 15.5?

I also need to import nested hierarchical XML files, for this in the past when using Ms SQL Server I have used the Ms Bulk loader dll provided by Microsoft (SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class). What is the most performant means of importing nested XML to Sybase?

Many thanks

XML EXAMPLE
<personCol>
<person>
<id>1111</id>
<name>John</name>
<age>21</age>
<sex>M</sex>
<addressCol>
<address>
<type>home</type>
<address>XXXX</address>
</address>
<address>
<type>work</type>
<address>YYYYY</address>
</address>
<address>
<type>delivery</type>
<address>XXXXXX</address>
</address>
</addressCol>
<status>single</status>
<phoneCol>
<phone>
<type>home</type>
<number>11111111</number>
</phone>
</phoneCol>
<note>Note 1</note>
</person>
<person>
<id>2222</id>
<name>Mary</name>
<age>45</age>
<sex>F</sex>
<addressCol>
<address>
<type>home</type>
<address>XXXX</address>
</address>
</addressCol>
<status>single</status>
<phoneCol>
<phone>
<type>home</type>
<number>22222222</number>
</phone>
<phone>
<type>work</type>
<number>3333333</number>
</phone>
</phoneCol>
<note>Note 1</note>
</person>
</personCol>