Re: Help with XSD Schema
From: Vai2000 (nospam_at_microsoft.com)
Date: 03/25/04
- Next message: ~toki: "Looking for a hierarchy tool"
- Previous message: Pete Davis: "Re: String empty test"
- In reply to: Steve Alpert: "Re: Help with XSD Schema"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Mar 2004 15:14:31 -0500
Thanks Steve,I had tried that out using the following snippet
StringReader sr=new StringReader(xmlDoc);
DataSet ds2 =new DataSet();
ds2.ReadXmlSchema(@"myschema.xsd");
ds2.ReadXml(sr);
GOT ERRORED OUT SAYING "Input string was not in a correct format."
:(
"Steve Alpert" <help@work.r.us> wrote in message
news:uTrdnFpEEHA.1228@TK2MSFTNGP11.phx.gbl...
> I'd expect you want to change:
>
> <xs:simpleContent msdata:ColumnName="item_Text" msdata:Ordinal="2">
> <xs:extension base="xs:string">
>
> to:
>
> <xs:simpleContent msdata:ColumnName="item_Text" msdata:Ordinal="2">
> <xs:extension base="xs:long">
> ^^^^^^^^
>
> /steveA
>
> Vai2000 wrote:
> > Hi all!!
> > This is my XML
> > <foo>
> > <item name="gold" carat="18">8987</item>
> > <item name="gold" carat="14">8907</item>
> > </foo>
> >
> > AND THIS WAS THE SCHEMA GENERATED VIA THE VS IDE
> > I want the item_Text to be INTEGER type as well as name to Code instead
of
> > item_Text !!! What changes are required in the schema for that?
> >
> > TIA
> > <?xml version="1.0" ?>
> >
> > <xs:schema id="foo" targetNamespace="http://tempuri.org/xsd_int.xsd"
> > xmlns:mstns="http://tempuri.org/xsd_int.xsd"
> > xmlns="http://tempuri.org/xsd_int.xsd"
> > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
> > attributeFormDefault="qualified" elementFormDefault="qualified">
> >
> > <xs:element name="foo" msdata:IsDataSet="true"
> > msdata:EnforceConstraints="False">
> >
> > <xs:complexType>
> >
> > <xs:choice maxOccurs="unbounded">
> >
> > <xs:element name="item" nillable="true">
> >
> > <xs:complexType>
> >
> > <xs:simpleContent msdata:ColumnName="item_Text" msdata:Ordinal="2">
> >
> > <xs:extension base="xs:string">
> >
> > <xs:attribute name="name" form="unqualified" type="xs:string" />
> >
> > <xs:attribute name="carat" form="unqualified" type="xs:string" />
> >
> > </xs:extension>
> >
> > </xs:simpleContent>
> >
> > </xs:complexType>
> >
> > </xs:element>
> >
> > </xs:choice>
> >
> > </xs:complexType>
> >
> > </xs:element>
> >
> > </xs:schema>
> >
> >
- Next message: ~toki: "Looking for a hierarchy tool"
- Previous message: Pete Davis: "Re: String empty test"
- In reply to: Steve Alpert: "Re: Help with XSD Schema"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|