xsd

Validating large Xml files

As a follow up to my issue transforming large Xml files, I now need to validate the schema. I was using this extension method, which can clearly be improved upon as it's not working correctly either public static XElement ValidateXsd(this XElement source, string xsdPath) { var errors = new XElement("Errors"); // Reference: htt...

What xsd will let an element have itself as a sub element infinitely?

How can I create an xsd to give me this type of xml structure that can go on infinitely? <?xml version="1.0" encoding="utf-8" ?> <SampleXml> <Items> <Item name="SomeName" type="string"> This would be the value </Item> <Item name="SecondName" type="string"> This is the next string ...

XML output from infopath

Hi guys, I have a program that requires well formed XML for input. As such, we have an XML schema to enforce constraints. To make it easier for users to enter data we have used InfoPath to generate a form based on the XSD. Now we have two issues. The XML produced by InfoPath is not really user readable. The formatting is a bit rand...

XS:Group causes Schema to fail validation

I have an XML document based on a Schema that uses the xs:group element to bunch elements together. The result is an entity where name, address and phone number are defined in a group. This fails Schema validation in MS (Visual Studio) as well as XERCES (oXygen XML editor) Is there a workaround? ...

JAXB Locator - missing dependency?

On my current project we generate JAXB beans from an XSD file. We need line number information on the beans (beyond XSD validation errors!) so I used the -Xlocator option specified here: http://java.sun.com/webservices/docs/1.6/jaxb/xjc.html However, I'm missing the Locator class. The jar file referenced to on that six-year old page ca...

Is there a way to enforce/preserve order of XML elements in an XML Schema?

Let's consider the following XML Schema: <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.example.org/library" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:lib="http://www.example.org/library"&gt; <element name="library" type="lib:libraryType"></element>...

.Net Xml Serialize - XSD Definition for Multiple Namespaces

The following XML was generated by serializing .Net objects: <?xml version="1.0" encoding="utf-8"?> <Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://EPS.WebServices/WebServiceSchema" > <Method xmlns="http://EPS.Library/RequestSchema"&gt;PackPlacementUpdate&lt;/Me...

What does "Unatuthorized zone" mean when browsing xsd files with Visual Studio 2010?

When I open up an xsd file that includes other xsd files, all of the included files are added to a section called "Unauthorized zone". Visual Studio highlights the xs:include element and gives the following error when trying to resolve the schemaLocation attribute: Request for the permission of type 'System.Security.Permissions.FileI...

Creating XML file from XSD

I have to convert a dll file to XML in command line. I've created an xsd file fron the dll (by the command :xsd.exe ---.dll) now I'm searching command that can create the XML. Can so,one help me?? ...

required element content

I'm trying to create xsd for an element like this: <ElementType attr1="a" attr2 ="b">mandatory_string</ElementType> and I want to make the mandatory_string required. What should I add to this xsd: <xs:complexType name="ElementType"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="attr1" type="StringLength...

XSD generation from a SQL Server database using schemas

I'm willing to use NDbUnit on a SQL Server database which uses schemas. I have to generate the XSD schema from the database. Visual Studio has a tool to do that, but Visual Studio 2005 doesn't include the schema information in the generated XSD. Therefore, NDbUnit fails because the generated SQL queries do not match the database. Worse...

Schema for element with Attributes and Child nodes

I am trying to write xsd type schema for an element that has a custom type to include addition attributes to extend a base type. I am running into trouble getting the syntax right. <xs:element name="graphs"> <xs:complexType> <xs:sequence> <xs:element name="graph" minOccurs="1" maxOccurs="...

Is there any C++ XSLT library?

I want to transform an XSD Document into XML Document(Template), is there any C++ XSLT library? ...

.Net SvcUtil: attributes must be optional

Hi, I'm trying to generate C# code classes with SvcUtil.exe instead of Xsd.exe. The latter is giving me some problems. Command line: SvcUtil.exe myschema.xsd /dconly /ser:XmlSerializer Several SvcUtil problems are described and solved here: http://blog.shutupandcode.net/?p=761 One problem I can't solve is this one: Error: Type 'Dat...

How to change TXSDateTime SOAP serialization in Delphi 7?

I am trying to use Java based webservice and have soap request: <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt; <SOAP-ENV:...

Creating XSD Dynamically

I have two inputs. I get as input one XML file. I have to create an XSD file for this XML file. This XML file has tags which depend on another input. But that XML file should have certain tags for sure. For example, the XML file has the following structure : <A> <B> <C>...</C> <D>...</D> <E> <F>...</F> <G>...</G> </E> </B> </A> Here, i...

How can we add IntelliSense to visual studio in time of nhibernate mapping file editing?

How can we add IntelliSense to visual studio in time of nhibernate mapping file editing? ...

XML and XSD - use element name as replacement of xsi:type for polymorphism

Taking the W3C vehicle XSD as an example: <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cars.example.com/schema" xmlns:target="http://cars.example.com/schema"&gt; <complexType name="Vehicle" abstract="true"/> <complexType name="Car"> <complexContent> <extension base="targe...

Webservice description - xsd schema and xml generation

Hello I want to design a WebService for communication between Win Mobile 6.5 based Palm device and a PHP web server. The Palm device software will be developed on .NET compact framework. The communication between web server and device I envision as XML over HTTP. I want a tool that will let me design the Webservice (interfaces, methods)...

Using XML Schema for code autocomplete in my XML editor

I have XSD file (for example) http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd and I would like to use it for adding code autocomplete in my xml editor (I prefer Eclipse but any other free editor would be O.K.). Is it possible? And if Yes, how can I do it? ...