xsd

XSD inheritance design

I have this in my xsd: <xsd:simpleType name="line_action"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="add"/> <xsd:enumeration value="delete"/> <xsd:enumeration value="remove"/> <xsd:enumeration value="suspend"/> <xsd:enumeration value="restore"/> <xsd:e...

Comparison of xsd codegenerators (C#)

I'm doing some research in code generation from xsd schema files. My requirements: Must generate C# 2.0 code, using generic collections where needed. Must generate comments from the xsd comments Must generate fully serializable code. Should be able to generate resuable basetypes when generating from multiple xsd's with the same includ...

How to do mutually exclusive attributes in XML schema?

I'm trying to make two XML attributes to be mutually exclusive. How can one create an XSD schema to capture this kind of scenario? I would like to have one of these <elem value="1" /> <elem ref="something else" /> but not <elem value="1" ref="something else" /> ...

How can I use Linq with Dataset.xsd files?

How can I use Linq with Dataset.xsd files? I've looked at Linq-to-Datasets and Linq-to-XSD but they don't really seem to work directly with the Visual Studio DataSet.xsd files. EDIT: I actually found a great link for this: link text but I can't seem to figure out what to do if I want to query on related tables. Dim taFields As N...

Is there a utility to create VB.NET classes from an XSD file?

Is there a utility out there that will create VB.NET classes from a Dataset.xsd file? And I don't mean like the XSD.exe utility does - all that does is convert the XML of an XSD file into classes in a .vb - it doesn't append any "extended" functionality. I'm basically looking for something that will generate the beginnings of a busin...

vs.net xsd

In the past, I have used XSD.exe to create c# classes from an xsd. Today, I added an XSD to VS.NET 2008 SP1 and it automatically generated a dataset from my xsd, slick but I don't want a dataset. Is there a way to have vs.net automatically execute xsd.exe each time I modify my xsd. ...

Set the combined length of values in child tags for a particular parent tag

in xsd i want to set the combined tags max value under a parent tag for the child tags. The maximum limit should be specified in the parent tag as the child tag are not mandatory. Maximum Combined length of value of all the tags should be defined. In case of any solution please mail it to [email protected] ...

XSD class generation nested tables problem

Currently I'm having a problem with generating class files from a xsd with repeating elements. I’m using the custom tool ‘MsDatasetGenerator’ in VS2005 SP1 witch create a typed dataset from the xsd for c#. I’m trying to parse the xml by this schema <?xml version="1.0" encoding=\"utf-8\"?> <xs:schema id="XSDobject" targetNamespace="h...

Convert XSD into SQL relational tables

Is there something available that could help me convert a XSD into SQL relational tables? The XSD is rather big (in my world anyway) and I could save time and boring typing if something pushed me ahead rather than starting from scratch. The XSD is here if you want to have a look. It's a standardized/localized format to exchange MSDS. ...

How to declare special XML schema (XSD) case - need help

I need your help to define a special case in XML schema: A sequence that contains two elements: 'x' and 'y' whereas: 'x' element can appear 0 to unbound times in the sequence 'y' element can appear 0 to 1 time in the sequence 'x' and 'y' locations can be anywhere - that is, it is possible to have unbound times the 'x' element and then...

XSD - How to describe an unordered set of element types where the first element must appear first in the sequence?

This is an XML schema question. I know that xsd:all element can't appear in a sequence (must be the top level element of its type). That is, I cannot use the following: <xsd:complexType name="Application"> <xsd:sequence> <xsd:element ref="Name"></xsd:element> <xsd:all> <xsd:element ref="ADD"></xsd:element> <xsd:...

undo changes on table in database

my application has the following procedure. a database of products (20,000 rows) exists. our client has 'import' feature where he imports an excel file. this is implemented by deleting all products table rows, then doing the import - which is a long thing since we programmatically performing calculations on the data. the obvious prob...

generate xml from xsd

Is there an IDE out there that can generate XML from XSD? Not Oxygen or XmlSpy, they are too expensive for me... command line based is ofcourse the preferred method! ...

Changing XSD ConnectionString at Runtime for a Multitenant app

Hello, I'm changing our application from "one set of code & one database" to "one set of code to multiple databases (one database per customer)". The original code is VS2005 ASP.NET(VB) & lots of XSD's in a separate DLL. The web.config's ConnectionString would override the one stored in the DLL at runtime. Now I need to change the Con...

XSD - Child elements depending on attribute value

I am trying to create an XSD schema for the following XML: <root> <!-- The actual file must contain one of the following constraints --> <constraint type="interval"> <min>100</min> <max>200</max> </constraint> <constraint type="equals"> <value>EOF</value> </constraint> </root> The child elements of the constrain...

Is there a way to generate java classes from MS-Dataset XSD files?

Given a Dataset XSD file, is it possible to generate java classes, that don't make use of System.Data? I've tried running a test using JAXB's XJC tool, but it doesn't produce anything terribly useful. Update: I've tried XmlBeans also, following Fernando's suggestion, and it generates something similar to the XJC output - that is, class ...

Easiest way to validate and read an xml file in .net?

What is the easiest/simplest/cleanest way to: Read an xml file from the filesystem Validate the xml against an xsd Read parts of the xml file into variables Using .net. ...

How to generate Java code from an XSD that includes MSFT Serialization: GUID datatypes?

I have used the Jaxme 2 libraries before to generate Java code from .XSD files without a problem. I'm currently encountering a problem generating Java from an XSD file that contains a http://schemas.microsoft.com/2003/10/Serialization/ namespace. Some sample code from my .XSD is: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns...

Visual Studio XSD files with DLLs for Web Projects

I'm trying to create a DLL using a Dataset.XSD file to access my website's VistaDB database. The DLL develops and builds fine but I need to build the DLL once and then change the "path" of the database in the all the Website projects that finally references the dll (different databases and therefor database paths for each website that r...

How do I handle a DBNull to Boolean conversion in my XSD DataSet?

In my database, I have a few columns in one of my tables that are bit (boolean) values. They are allowed to be NULL since the fields are not always going to contain data. I've gone through the process of creating an XSD DataSet using the table and made sure that the AllowDBNull field is set to True. However, when I pull a down record f...