\b{Irregular XML from XMLOutput stage}
Posted: Thu Jun 22, 2006 12:19 am
Hi
this is my sample schema.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="IDMIdentTran">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="BusNameGrp"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BusNameGrp">
<xs:complexType>
<xs:sequence>
<xs:element ref="BusName"/>
<xs:element ref="BusNameState"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BusName" type="xs:string"/>
<xs:element name="BusNameState" type="xs:NCName"/>
</xs:schema>
I want to populate 3 rows from a table to a xml file with 2 columns in each row.
the 2 columns are BusName and BusNameState.
I expect the output to be
<IDMIdentTran>
<BusNameGrp>
<BusName>
DUNKIN DONUTS
</BusName>
<BusNameState>
CT
</BusNameState>
</BusNameGrp>
<BusNameGrp>
<BusName>
DUNKIN DONUTS
</BusName>
<BusNameState>
NJ
</BusNameState>
</BusNameGrp>
<BusNameGrp>
<BusName>
DUNKIN DONUTS
</BusName>
<BusNameState>
CA
</BusNameState>
</BusNameGrp>
</IDMIdentTran>
But this is what i get from the XMLOutput
------------------------------------------
<IDMIdentTran>
<BusNameGrp>
<BusNameState>
CT
</BusNameState>
<BusNameState>
CT
</BusNameState>
<BusNameState>
CT
</BusNameState>
</BusNameGrp>
</IDMIdentTran>
Name>
DUNKIN DONUTS
</BusName>
<BusName>
BEE LINE AUTO & TIRE CENTER INC
</BusName>
</BusNameGrp>
</IDMIdentTran>
I dont know why the BusName element is getting screwed up. i see a "Name>" tag in the out put and dont understand the reason it is happening. i highlighted the wrong formatted area.
Any insights are appreciated.[/b]
this is my sample schema.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="IDMIdentTran">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="BusNameGrp"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BusNameGrp">
<xs:complexType>
<xs:sequence>
<xs:element ref="BusName"/>
<xs:element ref="BusNameState"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BusName" type="xs:string"/>
<xs:element name="BusNameState" type="xs:NCName"/>
</xs:schema>
I want to populate 3 rows from a table to a xml file with 2 columns in each row.
the 2 columns are BusName and BusNameState.
I expect the output to be
<IDMIdentTran>
<BusNameGrp>
<BusName>
DUNKIN DONUTS
</BusName>
<BusNameState>
CT
</BusNameState>
</BusNameGrp>
<BusNameGrp>
<BusName>
DUNKIN DONUTS
</BusName>
<BusNameState>
NJ
</BusNameState>
</BusNameGrp>
<BusNameGrp>
<BusName>
DUNKIN DONUTS
</BusName>
<BusNameState>
CA
</BusNameState>
</BusNameGrp>
</IDMIdentTran>
But this is what i get from the XMLOutput
------------------------------------------
<IDMIdentTran>
<BusNameGrp>
<BusNameState>
CT
</BusNameState>
<BusNameState>
CT
</BusNameState>
<BusNameState>
CT
</BusNameState>
</BusNameGrp>
</IDMIdentTran>
Name>
DUNKIN DONUTS
</BusName>
<BusName>
BEE LINE AUTO & TIRE CENTER INC
</BusName>
</BusNameGrp>
</IDMIdentTran>
I dont know why the BusName element is getting screwed up. i see a "Name>" tag in the out put and dont understand the reason it is happening. i highlighted the wrong formatted area.
Any insights are appreciated.[/b]