Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 4th, 2003, 07:29 AM
Registered User
 
Join Date: Sep 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Schema and Data in the same file, check possible?

Hi There,

   I've created a XML file that contains a schema and the data, I would like to know if there's any problem in doing this?
and,

   Is it possible to make a validation in VB(data againt schema), if yes, how (simple example, please)?

Thank You

   Luís Pinho


Example:

Code:
 <?xml version="1.0" encoding="UTF-16" standalone="yes" ?> 
 <IfxXmlDoc>
 <xs:schema xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" version="1.0" id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <xs:element name="IfxXmlDoc">
 <xs:complexType>
 <xs:sequence>
  <xs:element minOccurs="0" name="string" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="int_i32" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="long_i64" nillable="true" type="xs:long" /> 
  <xs:element minOccurs="0" name="f32" nillable="true" type="xs:Float" /> 
  <xs:element minOccurs="0" name="f64" nillable="true" type="xs:double" /> 
  <xs:element minOccurs="0" name="date" nillable="true" type="xs:dateTime" /> 
  <xs:element minOccurs="0" name="boolean" nillable="true" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="opaque" nillable="true" type="xs:base64Binary" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
  <string>This is a simple example string</string> 
  <int_i32>10000</int_i32> 
  <long_i64>234567345673456</long_i64> 
  <f32>2132131</f32> 
  <f64>2132131</f64> 
  <date>04-12-2003 11:29:13</date> 
  <boolean>True</boolean> 
  </IfxXmlDoc>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Save database schema to XML file brettk_1 General .NET 2 September 16th, 2006 04:27 AM
Need help with my Flat File Schema cmiller66 Biztalk 0 August 21st, 2006 10:48 PM
How to bypass Schema Check manishnautiyal Biztalk 0 March 31st, 2005 03:11 AM
ADO.NET writing XML file by schema using datasets inspirito C# 0 February 1st, 2005 11:35 AM
check if file is an image file silver_cuts Classic ASP Basics 10 June 30th, 2004 12:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.