xml-schema

GUI from XML+Schema

Hello. I have a complex XML+Schema to configure my system. I'm looking for a quick and dirty way to give my users access to that XML but in a simple GUI that also validates the entries. Is there some tool that can generate GUI (preferably C#) from the XML ? Thanks, SW ...

loading datatable from xml schema

Hi there, I m trying loading data table from xml schema. I can see column names on datatable but, i cant see datas. here is my code: StringReader sr = new StringReader(dsSorgu.Tables[0].Rows[i]["sorguSonucu"].ToString()); s.M_Sonucu = new DataTable(); s.M_Sonucu.ReadXmlSchema(sr); srgKullaniciSorgulari.Add(s); sr contains...

XSD any element any order any number of times

I have tried all the xs:all, xs:choice, and xs:sequence. Does anybody know how would you validate something like this. <Menu> <SubMenu> <MenuItem .. /> <MenuItem .. /> <MenuItem .. /> </SubMenu> <MenuItem .. /> <MenuItem .. /> </Menu> Where, Under the tags Submenu, MenuItem can ...

Limit only numeric chars in XSD in variable sized element

I have the following XML: <customer> <name>John Paul</name> <cpf_cnpj>1376736333334</cpf_cnpj> </customer> The <cpf_cnpj> element must have a minimum size of 11 and a maximum size of 15, and there can only be numeric (between 0 and 9) characters. My XSD is looking like this: <xs:schema attributeFormDefault="unqualified" elementFo...

Using XDocument to create schema ordered XML

I'm currently trying to find a way of adding some extra elements to existing xml documents in schema order. The xml has a schema attached to it but I've been unable to find a way to get XDocument manipulations to conform to the schema order. Example schema extract <xs:element name="control" minOccurs="1" maxOccurs="1"> <xs:complexT...

Set nillable element with Relax NG

Is there a way to declare that an element can be null using Relax NG, something like xsi:nillable="true" using XSD? ...

Create new typed DataSet object (c#)

I use a DataGrid to show a xml file. The Grid's DataSource is a Typed DataSet.(using schema) Assembly assembly = Assembly.GetExecutingAssembly(); Stream stream = assembly.GetManifestResourceStream("XML_Reader.Resources.schema.xsd"); XmlSchemaSet schemas = new XmlSchemaSet(); XmlReaderSettings settings = new XmlReaderSett...

validation error [ There is no ID/IDREF binding for IDREF ]

I am getting this error message when validating my XML file against its Schema. Can anyone suggest what might be wrong? The XML file is: <?xml version="1.0"?> <family-tree xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ftree.xsd"> <person id="p5"> <name> <given>Al Frank</given> <surname>Smith</surn...

Converting HTML emails to "Well Formed XHTML Code"

I've trying to submit html emails to amazon's mechanical turk using the questionform xml data scheme. I'm having issues converting the html emails into well formed html data. I just input a script to grab it from my table and print the data inside the tags of the html email, but as you can see below, it's terribly formed and will not...

How can I make my WCF message contract show up in the imported schema?

Hi All, A client provided us with schemas and a wsdl for a service they would like developed. When I jumped on the project, there was already a service implementation in place. When I pull up the svc file in IE, it shows the normal svcutil command etc.. When I drill down and I look at the schemas being imported by the wsdl we're using, I...

how to enforce atleast one occurence for 2 element types in XSD schema

Hi, I need to develop an xsd for the scenario. where i have 2 element of types Server1 and Server2. There can be any number of occurances for Server1 and Server2 but atleast one of the occurance is mandatory either Server1 or Server2. <element name="Server1"> <complexType> <sequence> <element name="hostName" type="string"/> ...

how to restrict elements from complex type when the element is referred

i have scenario where have to restrict few elements from the complextype element when referred. For example below element AD when referred in ADConfig, i want only elements domainName,userName,password to be referred not hostName, portNumber. <element name="AD"> <complexType> <sequence> <element n...

Create an XML Schema for an unlimited number of unordered elements in a mixed element.

I am trying to create an XML Schema that will allow both text and elements in the element <content> with an unlimited number of <a>, <b> and <c> element in any order. An example XML would be below. <xml version="1.0" encoding="UTF-8"?> <article xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="article....

XML Schema: how to have multiple identical elements?

Hi everyone, I'm having quite a hard time on constructing my 1st XML Schema. I need it to verify the correctness of an XML document that forms a questionnaire. So here's the section in don't get: I changed the source. The 1st answer refers to this code: <root> <values> <value>Lorem</value> <value>ipsum</value> ...

Need to parse a xml string

Hi I need to a parse an xml string(.NET, C#) which , unfortunately, is not well formed.. the xml stream that i am getting back is <fOpen>true</fOpen> <ixBugParent>0</ixBugParent> <sLatestTextSummary></sLatestTextSummary> <sProject>Vantive</sProject> <ixArea>9</ixArea> I have tried using a xml reader, but its crashing out because it...

xsd: How to extend a type with an unordered list of elements

Hello. This is a part of my xml schema <xs:complexType name="Friend"> <xs:all> <xs:element name="name" type="xs:string" /> <xs:element name="phone" type="xs:string" /> <xs:element name="address" type="xs:string" /> </xs:all> </xs:complexType> <xs:complexType name="Coworker"> <xs:all> <xs:ele...

C# + Programming against a web service with just .xsd and .xml files

Hello, I have an old school ASP (note: not ASP.NET) web site that has a file called "listener.asp". This file is the interface to the "web service api". This file is on a machine that I cannot access for a while due to maintenance and implementation. However, I have been given a bunch of xml files. These xml files end with "*Request.xml...

XSD schema that allow random order

I'm try to design a XSD schema that allow elements to be in a random order and have maxOccurs="unbounded". My XML: <root> <key></key> <group></group> <group> <key></key> <key></key> <group> <key></key> <key></key> </group> </group> <key></key> <key></key> <group> <key></key> ...

Error when validating a XML with XSD

I'm trying to validate a XML file with XSD, but I get a "Could not find schema information for the element 'xxx'" for each element and attribute. My C# code is: public ReadeXmlFile(string FilePath) { var settings = new XmlReaderSettings { IgnoreComments = true, ValidationType = ValidationType.Schema, Check...

Anyone using OASIS CAM (Content Assembly Mechanism)?

I was researching on alternate schema representation mechanisms and came across OASIS CAM. I found it very relevant for my project. Wondering if anyone is using it in some real implementation. ...