Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid URI: The URI scheme is not valid.
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00692663
Message ID:
00692666
Views:
32
You will have to tell ReadXml to actually read the schema. The following would work.

dsStaff.ReadXml(lcStaffXML, XmlReadMode.ReadSchema);


>I am getting the error "Invalid URI: The URI scheme is not valid." When I use ReadXML() into a dataset. I don't understand what the error means. Is the XML invalid? Any ideas what could be invalid about it?
>
>oStaff is a VFP COM object that returns a VFP cursor using CursorToXML with the following parameters.
>
>
>= CURSORTOXML("cResult","lcXMLResult",1,0,0,"1")
>
>
>
>
>// create staff object
>int lnStaffID;
>string lcStaffXML;
>Staff oStaff = new Staff();
>DataSet dsStaff = new DataSet();
>
>lnStaffID = Convert.ToInt32(Request.QueryString.Get("id"));
>// get the XML string of the unchanged data
>lcStaffXML = oStaff.GetRecord(lnStaffID);
>// read xml string into a dataset
>dsStaff.ReadXml(lcStaffXML);
>
>
>Here is the XML string
>
>
><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
><VFPData>
>	<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
>		<xsd:element name="VFPData" msdata:IsDataSet="true">
>			<xsd:complexType>
>				<xsd:choice maxOccurs="unbounded">
>					<xsd:element name="cresult">
>						<xsd:complexType>
>							<xsd:sequence>
>								<xsd:element name="id">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"/>
>											<xsd:fractionDigits value="0"/>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="name">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:string">
>											<xsd:maxLength value="20"/>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="info">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:string">
>											<xsd:maxLength value="20"/>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="in" type="xsd:boolean"/>
>							</xsd:sequence>
>						</xsd:complexType>
>					</xsd:element>
>				</xsd:choice>
>			</xsd:complexType>
>		</xsd:element>
>	</xsd:schema>
>	<cresult>
>		<id>23</id>
>		<name>John Smith</name>
>		<info>CSICU</info>
>		<in>true</in>
>	</cresult>
></VFPData>
>
>
- Jayesh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform