I am using xsd.exe to generate some c# classes from a .xsd file. I ran into the same issue that is covered here and on other sites where xsd.exe generates Type[] arrays instead of generic List collections for types in the .xsd file. Some people have suggested that svcutil.exe can be used as a replacement for xsd.exe if you pass the /dat...
What is the difference between using xsd:unique and xsd:key?
...
I'm looking at some work updating classes generated from xsds. I think this would be a great use of T4 templates, but I don't see any examples of people doing this. Essentially, I'd like to do what Linq to XSD has done, but without including alpha build targets in a production solution.
Any relevant links out there?
Now a wiki. St...
I have classes for entities like Customer, InternalCustomer, ExternalCustomer (with the appropriate inheritance) generated from an xml schema. I would like to use JPA (suggest specific implementation in your answer if relevant) to persist objects from these classes but I can't annotate them since they are generated and when I change the ...
I'm using Castor XML code generator. If you have two schemas with complexTypes defined as follows:
<xs:schema ...blah...>
<xs:complexType name="FooBarType">
<xs:sequence>
<xs:element name="meh"/>
...etc...
</xs:sequence>
</xs:complexType>
<xs:element name="FooBar"/>
</xs:schema>
and
<xs:schema ...blah ...>
...
I have xml files that I read in at runtime, is is possible to validate the xml against an xsd file at runtime? using c#
...
I'm trying to use XSDObjectGen as a PreBuild in Visual Studio 2008.
I can run it on the command line:
XSDObjectGen\XSDObjectGen.exe AnalyticsDomainModel.xsd /l:cs /d /p /n:AdaptorAnalyticDomainModel.Primatives /n:AdaptorAnalyticDomainModel /f:AnalyticDomainModel
This then prompts for me to type two names spaces:
Imported namespace...
I have problem with types in my schema when trying to use xsd:any element
During validation i've got validation exception: The 'MerchantAccount' element is not declared.
The idea is to have ability to specify any properties and values within ExtendedProperties element.
Please advice what am i doing wrong.
Part of the schema
...
<xsd:...
I have created an XSD and have run XSD.exe on top of that .xsd file. It seems that my simple types that are restricted to enumeration values are not being generated as enums in the outputted .cs file.
For example, my xsd looks like this:
<xs:element name="ItemList" nillable="false">
<xs:complexType>
<xs:sequence minOccurs="1" maxOc...
Hi all.
I have an XSD and I want to verify incoming XML files from a webservice against that XSD for schema validation?
Any suggestions or pointers for existing Frameworks in Java to do that?
Help is appreciated in advance.
Cheers
...
Hello
I have my own domain model and corresponding XSD schema for it. It consists of data types and messages that are exchanged in my application. I use XJC tool from Java JRE 1.5 for generation of Java classes for the given XSD schema. The generated classes do not contain neither the serialization/deserialization method nor the validat...
Hi all.
We have an XML which needs to be validated against an XSD. The XML is being generated by XSTREAM. and We are using jaxp api's to validate the XML against the respective XSD. Unfortunately, currently our test case fail as the generated XML has elements/Tags in different order/sequence than the XSD.
Is it possible to ignore the ...
Hello!
I have a situation where an element in the XML-file can be of two different types in the XSD.
What I want to do is first to validate the entered value to the more strict type (if it's a person that fills out the form) and if that doesn't pull through, validate it to the lesser strict type (if it's an organization that fills out ...
Hi,
I have an XML i want to validate in java.
The only problem i have left is trying to write the XSD for an attribute which is actually a reference to a namespace.
It's not possible to use the "<xs:attribute name="xmlns"/>" because xmlns is not allowed as the name of an attribute.
Any ideas?
XML:
<header>
<abc xmlns="www.exam...
I have created a C# .net 2.0 webservice. I need to capture the raw XML sent from the client and validate it against an XSD and return any errors to the client. The webservice will allow the client to upload a list of widgets to our system.
The following is some background info:
I created an XSD to model a "Widget", which is a complex...
I am using xmllint --schema option to validate my XML that looks like this
<XML>
<Active>True</Active>
</XML>
In my schema file, I have following line that describes Active element.
<xsd:element name="Active" type="xsd:boolean" />
When I run xmllint, I get error messages that says
/tmp/schema_validation.xml:73: element
Activ...
Is there a way to create an XSD that allows an attribute from a different namespace, but only if it's qualified? An example of an XML file that would be valid according to the schema is
<d:document dx:size="a5"
xmlns:d="http://example.com/documents"
xmlns:dx="http://example.com/document-extensions"/>
The schema should enfor...
Hi all:
I am writing a native C/C++ .dll program which calls to .dll functions of many third party C/C++ libraries and returns a c/c++ structure array (SA) of 18 columns by 0-n lines. This returned value is then captured by a WCF C# web service program which "interop" with my .dll and, using .net xml library, serialize the result before...
I'm trying to write a script in PHP5 that will:
read in an XSD
let the user give an element/tag name which will serve as the context
output a list of elements allowed within that element/tagname based on the XSD
So far I'm only able to see solutions for using XSDs to validate XML files. Anyone done something like this before?
...
Why won't this xml schema validate ? Visual studio says that the simpleContent tag is an invalid tag. If I then remove the attribute it says that the base type for my restriction is undefined in http://www.w3.org/2001/XMLSchema
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
<xs:complexType name="Person">
<xs:at...