Transformation XML to Datapacket

Hi,

I do use Xml file, I need to convert the file to xml datapacket.

I want the attribute fieldname of the datapacket get the caption value of
the field.
Something like the following for the field "Name":
fieldname=value of the caption of the field.

Thanks for your help.
pierre.


<XmlTransformation Version="1.0"><Transform Direction="ToCds"><SelectEach
dest="DATAPACKET\ROWDATA\ROW" from="\tst\Customer"><Select dest="@No_"
from="\No_"/><Select dest="@Name" from="\Name"/><Select dest="@Search_Name"
from="\Search_Name"/><Select dest="@City"
from="\City"/></SelectEach></Transform><XmlSchema
RootName="tst"><![CDATA[<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="tst" type="tstType"/>
  <xs:complexType name="tstType">
    <xs:sequence>
      <xs:element name="Customer" type="CustomerType" minOccurs="0"
maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Customer" type="CustomerType"/>
  <xs:complexType name="CustomerType">
    <xs:sequence>
      <xs:element name="No_" type="No_Type"/>
      <xs:element name="Name" type="NameType"/>
    </xs:sequence>
    <xs:attribute name="Version" type="xs:string"/>
  </xs:complexType>
  <xs:element name="No_" type="No_Type"/>
  <xs:complexType name="No_Type">
    <xs:sequence/>
    <xs:attribute name="Caption" type="xs:string"/>
    <xs:attribute name="FieldLength" type="xs:string"/>
  </xs:complexType>
  <xs:element name="Name" type="NameType"/>
  <xs:complexType name="NameType">
    <xs:sequence/>
    <xs:attribute name="Caption" type="xs:string"/>
    <xs:attribute name="FieldLength" type="xs:string"/>
  </xs:complexType>
</xs:schema>]]></XmlSchema><CdsSkeleton/><XslTransform/><Skeleton><![CDATA[<
?xml version="1.0"?><DATAPACKET Version="2.0"><METADATA><FIELDS><FIELD
attrname="No_" fieldtype="string" WIDTH="13"/><FIELD attrname="Name"
fieldtype="string"
WIDTH="28"/></FIELDS><PARAMS/></METADATA><ROWDATA/></DATAPACKET>
]]></Skeleton></XmlTransformation>

Cordialement,

Pierre Louis.

Received on Monday, 17 June 2002 19:36:32 UTC