Take tag attributes as columns

Hi, i want use a ADODB.RecordSet(RS) as Table datasource, one of RS methods retrieve data as XML, but, the name fields are into z:row. the XML Format looks like this:

<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882' xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882' xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'><s:ElementType name='row' content='eltOnly' rs:CommandTimeout='30'><s:AttributeType name='c0' rs:name='' rs:number='1' rs:nullable='true'><s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='13'/></s:AttributeType><s:extends type='rs:rowbase'/></s:ElementType></s:Schema><rs:data><z:row c0='ASA00032531A'/></rs:data></xml>

I read the documentation and i understand (i guess) my XML should be like this:


but i want use the original XML returned by RS

can you help me?

Arturo Guerrero
September 1,
Here Alex explains how to do that with a attribute-based xml file..


BUT, I have been try with a ADO persisted XML file, just like yours and I haven´t good results.. Anyway.. I transformed the file into an element based using making and using this XSLT file...

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" />
<xsl:preserve-space elements="*"/>

<xsl:template match="node( ) | @*">
<xsl:for-each select="rs:data">
<xsl:apply-templates select="z:row"/>
<xsl:apply-templates select="s:Schema"/>

<xsl:template match="s:Schema">
<xsl:for-each select="s:ElementType">
<xsl:apply-templates select="s:AttributeType"/>

<xsl:template match="z:row/@*">
<xsl:element name="{name( )}">
<xsl:value-of select="." />

<xsl:template match="z:row">
<xsl:element name="R">
<xsl:apply-templates select="@*"/>

<xsl:template match="s:AttributeType">
<xsl:element name="c">
<xsl:attribute name="tipo">
<xsl:value-of select="s:datatype/@dt:type"/>
<xsl:value-of select="@name"/>


As you can see... I put all data fields just at the EOF, that´s cause the number and nature of data fields, in my case, are completelly variable.. Anyway you can remove this especification if you want. Once you convert your ADO persisted xml file (using the server tech for DOM interface you want).. you can simply load this element-based xml into a ActiveWidgets grid..

That works for me...

Raciel R.L.
February 14,
Raciel R.L.
February 14,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.