xsd

Complete XML Schema Validation

I am looking for a tool that will tell me all of the XML Schema validation failures. All the other tools I have looked at so just tell me the first couple, and then I have to fix those before it will tell me the next errors. I realize that some errors may be dependent on other nodes being in different orders, but things like data types...

Validating XML with multiple XSD using relative paths in .NET

I'm trying to write a generic VB.NET (VS2005) function to validate an XML document against an XSD. This works fine until I use an XSD with a relative path include like: <xs:include schemaLocation="test.02.xsd" /> It can never seem to find what is included in any secondary documents. Here is my original function below. I've been pla...

.Net XML Serialization based on an XSD?

Hi, I've been serialising and deserialising .net objects using the XmlSerializer class without problem, however we now need somebody else to look at that data to perform some analysis on it. In order to help with that we've produced an XSD based on our class like so: xsd.exe /t:DataClass Assembly.exe The start of the XSD looks like th...

How to validate an XML file with a schema in memory with .NET?

Is it possible to validate an XML file using an XSD loaded at runtime from embedded application resources instead of using a physical file, with .NET (Framework 3.5)? Thanks in advance ...

In C#, how to determine the XSD-defined MaxLength for an element.

Hi, I'm using XmlReader with an attached XSD for validation. As my XML document is being read and validated, I want to determine in my C# code the 'maxLength' value specified in the XSD for a particular element. For example, my XSD fragment is very simply defined as: <xsd:element name="testing" minOccurs="0"> <xsd:simpleType> ...

Generating XML from XSDs

Hello SO Readers, I have an bunch of XSDs which in turn inherits schema's from different XSD's and I need to generate an XML file for testing purpose from this XSD. I am using the oXygen XML Editor to do this but when I try to do it, it is not working for me and it says please define root node but than it does not allow me to do so. So...

SOAP UI: Can I add assertion to validate with local XML Schema file?

Hi all, I have created a Web Service (with Java, Axis). Depending on the content of the request, the response may have a different XSD. So, the WSDL only specifies that the response is of a generic XSD, and the responses comply to XSDs that import and extend the generic XSD. Unfortunately, the Schema assertion fail because the XSD spec...

Working with Multiple XSD's

I have an xsd which has 3 imports to another xsd, 8 complex types and 3 simple types. Now of this I have to work on only 1 compex type, which in turn inherits many other XSD - mainly the 3 imports which current xsd's has. I will be getting XML file containing data only according to 1 complex type only, which I have mentioned. Now am...

How to set default datetime values in an XSD element

I am currently stuck at this point where I need to set an xsd element's default attribute to have a valid current date as default. I looked around (googled) but did not find anything convincing. I need to do this in declaratively. <xs:element name="UpdatedDate" type="xs: dateTime" msdata:Caption="Updat...

How do you validate XML with portion of XSD ?

How do you validate XML with only a portion of XSD ? ...

Reuse JAXB generated class as JAX-WS web service parameter

I have some XML type in Java classes which are defined in XSD and generated by XJC. Then I write some java methods with JAX-WS Annotation, and let those generated Java classes of XML type as parameter types of the web services. The code is deployed on Geronimo. And Geronimo should run some WsGen tasks to generate WSDL and service runti...

.NET XSD Documentation Generator

Hi, I'm looking for an XSD Documentation Generator for .NET. Please, provide any references. Note: If it is available with source code that would be much better choice. Thanks. ...

How to validate a xml file against a given xsd file while parsing it with a sax parser?

I want to parse a xml file using a SAXParser or XMLReader and verify that the file conforms to a specific xsd file (new File( "example.xsd" )). It's easy to do the validation against a xsd file in an extra step using a Validator like in this SO answer. to validate while parsing by specifying the name of the xsd as "http://apache.org/...

What is an xs:NCName type and when should it be used?

I ran one of my xml files through a schema generator and everything generated was what was expected, with the exception of one node: <xs:element name="office" type="xs:NCName"/> What exactly is xs:NCName? And why would one use it, rather xs:string? ...

Errors using SvcUtil.exe on a wsdl to generate proxy class - xs:group element

I'm trying to use SvcUtil against a wsdl file to generate proxy classes, but I'm getting an element missing error that I think is related to schema group elements. Does anyone know for a fact if svcutil can handle ? And if so will it handle xs:group elements that have ref attributes that point to the group definition that lives in anot...

Preserving Order In Sequence of Choices (LINQ To XSD)

Given the following XML example we could imagine a schema defining Root as containing a sequence of unbound number of choices between Type1 and Type2. <Root> <Type1 /> <Type2 /> <Type2 /> <Type1 /> </Root> I am testing out migrating from the XSD.exe tool which although adds type-safety has a lot of little annoyances. ...

xml schema and using a choice as the document root

I have a bit of a newbie xml schema question. I believe the answer is that what I need to do is not possible with schema, but I'd like to be sure. The problem is that I have a webservice that returns a response with one type of root element on success (say <Response>), and on a complete failure, returns a document with a different root e...

deserialize XML attribute with XSD

Hi all, I’m using XmlSerializer to deserialize complex object, using XSD auto-generated classes. But when it comes to enumeration, there is some problem, I want some attribute to be restricted to specific values, such as: <xs:simpleType name="choiceType"> <xs:restriction base="xs:string"> <xs:enumeration value="Yes"/> ...

Where I can find the official XSD schema for RSS 2.0

I am looking for the XSD schema of RSS. Via Wikipedia I have found several pages on the specifications of RSS 2.0 but none offers an XSD schema. I found several correct xsd files around on the web but all these schemas are created by individual developers. I'm surprised not to find a site official RSS 2.0 specification and provides a for...

How to get an elements order constraint in XML Schema ?

Hi, I've got a XML Schema (xsd file) snippet bellow, in which I want the NAME and ADRESS elements to appear in any order, but always before the FILM sequence. So I've been trying to do like this : <xs:element name="ROOM"> <xs:complexType> <xs:all> <xs:element ref="NAME"/> <xs:element ref="ADRESS"/> </...