About XSD Parser

Hello,

I have a XSD file which has the following format:

    <?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified">

<xs:element name="note">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="to" type="xs:string"/>
        <xs:element name="from" type="xs:string"/>
        <xs:element name="heading" type="xs:string"/>
        <xs:element name="body" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
</xs:element>

</xs:schema>

I need a tool which will parse the above XSD and automatically
generate a GUI to gather data for the above elements i.e. the GUI
should ask for "to", "from", "heading" and "body" fields from the
user. Once the fields are entered by the user, the tool should perform
validation checks based on the restrictions mentioned in the XSD file.
If the fields are valid the tool should create a XML file.

Is there a ready made tool which does something Similar to this?

If not, then can this be done easily from .NET?  Any references to
code or links on this?

Thanks,
Swapna

0
swaps12 (2)
10/8/2007 1:41:43 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
947 Views

Similar Articles

[PageSpeed] 56

swaps12@gmail.com wrote:

> I need a tool which will parse the above XSD and automatically
> generate a GUI to gather data for the above elements i.e. the GUI
> should ask for "to", "from", "heading" and "body" fields from the
> user. Once the fields are entered by the user, the tool should perform
> validation checks based on the restrictions mentioned in the XSD file.
> If the fields are valid the tool should create a XML file.
> 
> Is there a ready made tool which does something Similar to this?

You might want to check whether InfoPath 
<http://office.microsoft.com/en-us/infopath/HA101635771033.aspx> does 
what you are looking for.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
10/8/2007 1:51:21 PM
Hi,
   Thanks for the reference. It looks much similar. I will check it
out.

Swapna.


0
swaps12 (2)
10/9/2007 9:53:56 AM
Reply:

Similar Artilces:

trouble validating against xsd
Hello, I have an xsd file that I'm trying to use to validate some xml against. I'm hoping this is a simple problem, but I just don't see it. I get the error "The 'role' element is not declared." when trying to validate this xml: <users> <user id="jon" pwd="pass"> <roles><role>Admin</role></roles> </user> </users> Against this schema: <?xml version="1.0" encoding="utf-8" ?> <xs:schema elementFormDefault="unqualified" xmlns="" xmlns:xs=&...

About XSD Parser
Hello, I have a XSD file which has the following format: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"> <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="heading&q...

Entity XSD schemas are invalid
Hi, As part of doing a custom integration using BizTalk 2004, we need to do mappings between MS CRM and other applications. However the xsd's provided with the SDK and the stored procedures generating them are/produce invalid (non-w3c compliant) xsd. It might be an idea for someone in the MS CRM dev group to go over these xsd's with a validator and fix the incorrect sections, including th generating stored procedures so updated schemas can be made available for integration purposes. Best Regards Thomas Scheelhardt I have found the majority of examples in the SDK are incorrect an...

Ignoring Elements in XSD
How do I write a schema that is only validating elements: 1,4,7,8,9 and ignores every other element? I also need to not to care about the order of the elements or how many are in between elements that I am trying to validate. XML: <root> <element1 /> <element2 /> <element3 /> <element4 /> <element5 /> <element6 /> <element7 /> <element8 /> <element9 /> </root> XSD: <xs:element name="root"> <xs:complexType> ...

using embedded .xsd vs file based .xsd
I am thinking of embedding my schemas as embedded resources instead of reading it using URI at run-time. I came across some snags while trying to do just that such as, previously unknown to me, XmlValidatingReader.Schemas.Add was using XmlValidatingReader.Resolver to resolve my schemas using the URI method. Resolver property was never set, so the reader simply ignored any external references even though one of the schema explicitly imports the other one. I verified this by removing the referred schema from the schema collection, and the code chugged along fine. But when I changed the code to ...

Problems with XML, XSD, Web, Services & InfoPath
Hi all, Have been playing about with web services but unable to achieve what I am wanting and in attempts finding strange problems. I have created a web service for retrieving customer data and for updating the data using datasets. I have created a XML schema. I decided to use InfoPath for testing things out. Works great for getting the data. The data table on SQL Server 2000 allows nulls. If I was to change this I would have to split my customers into 2 tables. The table allows customer details to be stored as an individual or organisation. As a result some fields don't require ...

suppressing xsd namespace declarations with XmlSerialize?
Hi... I'm just starting to play around with xml serialization. Is there any way to suppress the xsd and xsi declarations in the resulting xml? It doesn't appear that they're used but they come out anyway. Thanks -Mark Hi Mark, We need to perform more research on this issue . We will reply here as soon as possible. If you have any more concerns on it, please feel free to post here. Thanks for your understanding! Best regards, Wen Yuan Hi Mark, Thanks for your wait. If you don��t need xsi and xsd declaration with xml serialization, you can use XmlSerializerNamesp...

Validating XML against XSD where XSD has includes
I have 2 Xsd's The one contains basic type definitions <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:simpleType name="TrueFalse"> <xs:restriction base="xs:NMTOKEN"> <xs:enumeration value="true"/> <xs:enumeration value="false"/> </xs:restriction> </xs:simpleType> </xs:schema> The other includes the previous XSD so th...

XSD #2
I have an XML that when I try to create an xsd schema for it it would error out and say something about duplicate keys. Does that mean that the XML is bad? Thanks How are you trying to create a schema for it? Are you using http://apps.gotdotnet.com/xmltools/xsdinference/ -- This posting is provided "AS IS" with no warranties, and confers no rights. <john88m@hotmail.com> wrote in message news:eCcFyFK1DHA.3416@tk2msftngp13.phx.gbl... > I have an XML that when I try to create an xsd schema for it it would error > out and say something about duplicate keys. Does that me...

XML/XSD: Show available attribute values from XSD in Intellisense
Hi: I want to limit the values that can be entered for particular attributes. 1) I have created an XSD from my XML document. 2) I dropped that XSD file into the following directory C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml 3) When I use VS.NET to create a new XML document, I do get the intellisense working (all attributes and elements show up). However, I want the intellisense also show the list of possible values that can be used for particular attributes. How do I do this? Thanks, Don I dont think intellisense would perform this for you. You ...

apply in-memory .xsd schema to updategram
Below I'm generating an updategram via xslt and currently referencing schema via <updg:sync mapping-schema="hpXSD.xsd"> .... </updg:sync> But I would like to LOAD the .xsd schema into memory and APPLY to the updategram in memory. Tried using XmlValidatingReader but couldn't get it to work. Thanks Dim xmlPath As String = "xml/hpXML.xml" Dim xsltPath As String = "xml/hpXSLT.xslt" Dim xsdPath As String = "xml/hpXSD.xsd" '(1) XML object Dim xmlDoc As XmlDocument = New XmlDocument xmlDoc.Load(xmlPath) Dim root As XmlElement = xml...

XSD
I am trying to design dataset xsd file using xsd designer. Every row on the table in question is defined with the following columns: id1 int dt date period0 string makeupdt0 string period1 string makeupdt1 string period2 string makeupdt2 string period3 string makeupdt3 string period4 string makeupdt4 string I am looking to represent period and makeupdt columns as part of a structure which occurs 4 times. Also, how do I access these elements using generated dataset class file? Thanks in advance, ...

Relative XSD path
Hi guys, I want to validate my xml by xsd schema. But in the xsd file I have RELATIVE includes to the others xsd files that located in ..\ directory for the main xsd. Could you provide me code example that makes such a validation. All the examples I found in google doesn't work. Thanks a lot, Aleksey Aleksey Timonin wrote: > I want to validate my xml by xsd schema. But in the xsd file I have RELATIVE > includes to the others xsd files that located in ..\ directory for the main > xsd. > Could you provide me code example that makes such a validation. All the > examples I ...

xsd questions (xsd to classes)
This is a multi-part message in MIME format. ------=_NextPart_000_0028_01C37925.474263F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have some questions regarding to use vs.net to generate xsd from = database tables then generate classes, not typed datasets, from the xsd. Basically I want to have some light-weigh classes to represent the = database tables/views (I know tables/view are not business entities, but = this is a good starting point and i am lazy =3D) Here are what I did: - used xsd.exe to generate business entities,...

Decimal Type in a XSD Schema and problems with DataAdapter
Hi every body, I am having a problem and I need your help, please I am using a XSD file; it has several nodes that have the following definition: <element name="guarantyPercent" type="decimal" /> As you can see, the type of guarantyPercent is decimal. In the XML file the guarantyPercent can be empty: < guarantyPercent /> (note: the XML File is not mine, this file comes from another company and is sent to me every five minutes, and for this reason I cannot change the form of this file is formed. But I can edit the XSD file) When I tried to load the XML F...

XSD
Where can I find the .xsd for the "Save As" XML Spreadsheet option. I am building out my own xml and need to validate it before I send it to excel. I've searched msdn, google, and all the common locations to no avail. If there is another means of validation(Aside from opening the file in Excel), please let me know. Thanks ...

XSD Schema
Hi Friends, Can you please help me out in describing an complex type that extends another simple type. I am trying to do this thing in Visual Studio .Net but when I try to create the DataSet for my Schema it is not getting created. In the below pasted code my complex type is extending a Simple Type: Following is the schema I am trying to create: ---------------------------------- <?xml version="1.0" encoding="utf-8" ?> <xs:schema id="TestNew" targetNamespace="http://tempuri.org/TestNew.xsd" elementFormDefault="qualified" xm...

XSD
HI, whats the purpose of xsd? whats this "Fetch XML Schema in XSD " I know and understand BNF. I am developing add-ons for MS CRM. How can xsd help me. uMar Khan XSD is a data schema for XML. If you're using an XML file as a database, the XSD defines what field type and size each tag is. -- Andreas Kyriacou, Senior Technical Consultant akyriacou@techplatforms.com ======================================================= GoldMine Certified Technician GoldSync Certified Technician ======================================================= Technology Platforms 276 King St. W Suit...

xsd:maxLength
Hi, I understand I can write an XSD file like... <xs:attribute name = "value1" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="30"/> </xs:restriction> </xs:simpleType> </xs:attribute> I'm writing a class heirarchy that I want to serialize into XML and I'd like to incorporate the above mentioned restriction for maxlength in my class. If I have a Pulic value1 as string, how do I restrict it to 30 characters? The only way I seem t...

xsd.exe bug or odd xsd file
I was given a couple of XSD files so that I could generate a client that targeted a SOAP/RPC web service. One of the XSDs includes a definition of an element that is a sequence of row elements, which in turn is defined as a sequence of column elements. The CS class file generated defines the sequence of row elements "rows as column() ()" rather than "row() As row". This seems to give trouble to XmlSerializer. With XmlSerializerPreCompiler I was able to narrow the problem down and guess at the problem. I made the change that I indicated above because this seems...

Help associate xml to xsd (schema) file...
I have translated a DTD to an XML Schema (XSD) file by hand, and the = Schema View in Visual Studio .NET 2003 seems to diplay everything = properly. However, when I specify the schemalocation in my xml files, VS.NET still = reports that no schema could be located. Here are the relevant (maybe) = portions of the files: FROM THE SCHEMA FILE (mydoc-v2.xsd) <?xml version=3D"1.0" encoding=3D"utf-8" ?> <xs:schema targetNamespace=3D"http://tempuri.org/XMLSchema.xsd" elementFormDefault=3D"qualified" xmlns=3D"http://tempuri.org/XMLSchema.x...

XSD question
If this is the wrong forum, please post the correct forum name. I am trying to create a complex XSD. I would like to know if anyone has an idea how to specify certain elements based on an attribute. In other words: I have tag A which as an attribute of "class"(sorry this can't change due to people on the other side) If the "class" attribute is 1, then only "div" tags are allowed. If the "class" attribute is 2, then only "p" tags are allowed. I know how to do this if it is elements, but I can't find anything on attributes...

Polymorphism in XSD
I'm trying to mirror some classes in an XML Schema: abstract class EndPoint class FileEndPoint: EndPoint class FtpEndPoint: EndPoint How can I mirror these in XML such that: <EndPoint> could contain either ... <EndPoint type="file" folder="..."/> or <EndPoint type="ftp" site="site.com" port="21" .../> ....depending on whether or not it was a FileEndPoint or FtpEndPoint. I have seen mention of "equivalence", but have not been able to track anything specific down. substitutionGroup...

xsd.exe: How to add base class to generated classes
I'd like to generate C# classes from an XML Schema file. All the generated classes should provide a basic member function framework like Save() and a basic member element like Dirty. Moreover, I'd like to have all the generated class properties overwritten so that a write will set the Dirty member to true (see example below). Is this possible using xsd.exe? Or is there some other way? Or do I need to write my own generator tool? Thanks for enlightening me! TIA, Axel Dahmen ----------------------------------------------------------- class GeneratedClass : BaseClass { private int ...

Help with XSD.EXE
Hello, I'm trying to create a dataset object from an xsd. The xsd contains this: <xsd:choice> <xsd:sequence> <xsd:element name="StartRange" type="AONrangeStructure"/> <xsd:element name="EndRange" type="AONrangeStructure" minOccurs="0"/> <xsd:element name="Description" type="AONdescriptionType" minOccurs="0"/> </xsd:sequence> <xsd:element name="Description" type="AONdescriptionType"/> </xsd:choice> When ex...