Hello,
I am trying to generate C# code from an XML schema with xsd.exe with Visual Studio RC1 (version 10.0.30128.1) but get the follwoing error:
C:\Development>xsd CR2008Schema.xsd /classes
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30128.1]
Copyright (C) Microsoft Corporation. All r...
I am running Visual Studio 2010. I have a XSD schema and want to use xsd.exe tool to generate appropriate C# file. I have done this successfully from a command line but now I want to do the same from IDE.
Is there some well-known route for this? I have managed to use a pre-build event but I hate to have the tool running on each build. N...
If you have an XSD with an includes reference.
Is it possible to generate 2 separate class files.
1 for the XSD, and 1 for the included XSD?
My Scenario
4 XSDs, each of which share 15-20 element definitions in common.
Rather than maintaining, I'd like to end up with the 4 XSDs all referencing a fifth file with the common definitions, an...
scratching my head on WCF ... I've got XML messages where the children of could be anything, e.g.
<Test1Root>
<CaseNo></CaseNo>
<Activity></Activity>
<DataFields>
<AccountRef></AccountRef>
<PropRef></PropRef>
<User></User>
</DataFields>
</Test1Root>
I've handled this in BizTalk using the xs:any for the
<xs:...
I can also settle for a web-based interface, but a good command-line tool is preferable. Now, I have tried to use xsd.exe that comes with mono-devel, but that skipped a whole bunch of stuff that was mentioned in the xml file.
I understand that I will need to hand-tweak the output, but I do want something decent to start with.
...
I have a set of classes build using xsd.exe, and I am trying to serialise them. However, an attribute is not being included in the resulting XML. Here is part of the schema where the problem lies.
<xsd:element name="Widget">
<xsd:complexType>
/* sequence removed for brevity */
<xsd:attribute name="Version" type="Vers...
I know I can generate an XSD files from a C# assembly using XSD.exe or svcutil.exe. Is there anyway to control what goes in to the XSD file? I am mainly interested in adding restriction tags.
...
Here is my attempt, xsd and classes created from xsd.exe
Running my code I get error "There is an error in XML document (1, 2)." Inner exception {" was not expected."}
Any help would be greatly appreciated.
Thanks!
XML Snippet:
<xml>
<creditBureau xmlns="http://www.transunion.com/namespace"
xmlns:xsi="http://www....
Hi, I have an XML schema in .xdr file. This is a shortened version of this file(just for example):
<?xml version = "1.0" encoding = "WINDOWS-1252"?>
<Schema name = "ANS.xdr"
xmlns = "urn:schemas-microsoft-com:xml-data"
xmlns:dt = "urn:schemas-microsoft-com:datatypes">
<ElementType name = "Shipment" content = "eltOnly" order ...
Running XSD.exe over a XML file, the resulting file is different from openning the XML in Visual Studio, clicking XML menu, Create Schema. Why? There are some kind of arguments for XSD.exe to accomplish that?
...
I have a large XML schema that has elements that look like this:
<xs:element name="Tmats">
<xs:complexType>
<xs:sequence>
<xs:element name="ProgramName" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>PN</xs:documentation>
</xs:annotation>
...
Hi,
Thanks for any help,
We have two XSD files, both of them shares some same entities and some others different. Note that the one with differences are called differently.
We want to generate C# code that can Serialize / Deserialize those entities, without ending up with two entities that share the same name and same content in two ...
I need to create XML serializer classes for approximately 65 XSD files, for which I am using Microsoft's XSD.EXE to generate the C# code...
However, I keep running into Window CMD's character limit in the resulting output file (in which XSD.EXE combines the name of every XSD included): "The specified path, file name, or both are too lon...
I'm using the following xml schema entry to deserliaze some xml into an xsd generated block.
<xs:element name="Action">
<xs:complexType>
<xs:attribute name="src" type="xs:string" use="required" />
<xs:attribute name="dst" type="xs:string" use="required" />
<xs:attribute name="create" type="xs:string" use="optional" />
<x...
Hi All,
I have a very simple XSD like below
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="SEARCH_INCIDENT" type="SEARCH_INCIDENT" />
<xs:complexType name="SEARCH_INCIDENT">
<xs:sequence>
<xs:element name="INCIDENT_NUMBER" typ...
I have XML docs with different roots coming from one source. I have a XSD schema just like described in this question, with the abstract='true' root element 'BaseElem' of a Base type, plus additional root elements Elem1, Elem2, ... that extend the Base type and use substitutionGroup='BaseElement' attribute.
xsd.exe generates BaseElem an...
Does there exist an Xml schema that will validate other XML schemas?
What I want to do is take such a meta-schema (if it exists) and run it through XSD.EXE so that I can use C# classes to read an arbitrary XML schema and analyze it.
...
I downloaded the XML Schema for XML Schemas at http://www.w3.org/2001/XMLSchema.xsd.
I then used XSD.EXE to create a class from the downloaded file. I called the class schema.cs.
I then executed this line of code:
XmlSerializer serializer = new XmlSerializer(typeof(schema));
and got this error:
The XML element 'annotation' from
...
For this xml:
<elem1 xmlns="http://www.fixprotocol.org/ns/fast/t/1.0">
<elem2>
<elem2/>
</elem2>
</elem1>
I have this schema, which seems to validate fine against w3 schema validation service, and the schema validates the above XML just fine. Sadly, xsd.exe and some other tools report it to be an error. Is that correct? Are ci...