xsd

XML Schema to C++ Classes

I have to write a C++ Application (using the Qt Framework for the GUI) that can edit data stored in xml files described by a xsd schema file. Is there a tool to convert the xsd schema into C++ Classes? ...

How to fix an XSD validation error?

Hi, I have an XML form with an element 0, which is well-formed but not valid. When I try to validate it XMLSpy I get a following error: Nothing is allowed inside empty element 'hidden'. Below is my schema: <xs:element name="hidden"> <xs:complexType> <xs:attribute name="datatype" type="xs:string" use="optional"/> <xs:attr...

schema validation with msxml in delphi

Hi, I'm trying to validate an XML file against the schema's it references. (Using Delphi and MSXML2_TLB.) The (relevant part of the) code looks something like this: procedure TfrmMain.ValidateXMLFile; var xml: IXMLDOMDocument2; err: IXMLDOMParseError; schemas: IXMLDOMSchemaCollection; begin xml := ComsDOMDocument.Crea...

Error deserialising XML document with strongly typed XSD

Hello, I am running into quite an annoying issue while trying to deserialise a specific XML document using XmlSerializer.Deserialize() method. Basically, I have a strongly typed XSD with an element of type double. When trying to deserialise the element for a specific XML document, I get the usual "System.FormatException: Input string ...

Converting an XML document to fluent C#

I'd like to convert an external XML document without any XSD schema associated with it into a fluent .NET object. I have a simple XML file like: <application> <parameters> <param></param> <param></param> </parameters> <generation /> <entities> <entity ID="1"> <PropTest>Test</PropTest>...

Map relational database to XML in C#

Hi, I have an application that needs to map relational database to XML. The issue is that the database structure is given (I cannot change it) and the XML Schema is given (comes from WSDL). I need to let the user of my application to tell the system that a given column in a table is mapped to a given element in the schema. Then my app...

Generating SQL Server DB from XSD

Duplicate: http://stackoverflow.com/questions/263836/generating-sql-schema-from-xml In a project i am working on, i have a need to support either a strongly-typed dataset for storing the data as XML, or storing the data in sql server. Now i already have the XSD schema created and i would like to be able to create a sql server database...

Generate an XSD using LinqToXml

Does anyone know how to generate an XSD using LinqToXml? I can't find any examples of this anywhere. The XSD will be of the following fairly low level of complexity: <?xml version="1.0" encoding="utf-8" ?> <!--Created with Liquid XML Studio 6.1.18.0 - FREE Community Edition (http://www.liquid-technologies.com)--&gt; <xs:schema ele...

JAXB Documentation Annotation

I have the following java class with the JAXB @XMLRootElement annotation @XmlRootElement(name="ClientData") public class ClientData { /** * The first address field of the person */ private String address1 = null; } which produces this xml fragment when i generate the xsd schema <xs:complexType name="clientData"> <xs:sequence> ...

What's the best XSD (XML Schema) authoring tool?

Good XML tools abound, but when it comes to creating (authoring) XSD files (XML schemas), things really don't look good. Most XML editors do the basic: it let you create stuff, with menus for the proper elements. They don't HELP you in any way, though. A few tools have more advanced features, like creating an XSD based on a sample of XM...

How to generate XSLT from XML samples

I am looking for at tool for semi automatic XSLT generation. Given 2 XLM files, source: <elm>XXX</elm> and target: <exx>XXX</exx> The tool should make the XSLT file, which produces the target from the source. Looking at the content, it should identify changes in level, placement, element names etc. There is no general solution to ...

Creating a custom JAXB annotation

Do people have any recommendations on how i could write my own custom JAXB annotation handling class to support the generation of xs:annotation/xs:documentation elements in the xsd schema?. I'd like to create a new java annotation "@XmlAnnotation" which would include a "documentation" attribute. I'd then make these classes available to t...

XSLT transformation datetime to date format

I'm trying to transform a datetime to a date format yyyy-MM-dd, because I'm using the xsd.exe tool the xs:date datatypes are automatically changed into a datetime datatype, because there is no type in the .NET Framework that matches the type xs:date completely. But I can't get it to work <articles> <article> <articlei...

Errors forming a JAXP Schema (javax.xml.validation.Schema)

We are using JAXB 2.x to generate data objects from a massive schema system (42 XSD files). That entire process runs fine, no problems there. But they deprecated (and removed from implementation) the entire JAXB validation framework, replacing it with the JAXP validation framework instead. (This is all located in the javax.xml.validation...

Anyone that has a partial XSD that describes the METADATA section of Delphi TClientDataSet XML files?

I know that you cannot fully describe the XML that the TClientDataSet with an XSD schema, as the ROW elements have attributes that have names that vary with the contents. However, the METADATA section of such an XML should be. So: is there anyone having a (partial) XSD that describes the METADATA portion of the XML that can be saved wi...

Online XSD diagram notation reference recommendations

Can anyone recommend a good online notation reference for XSD diagrams? I've been looking at the UML references I typically refer to and there is nary a mention of XSD/XML notation elements. Thanks, Matt ...

Is There a Tool to Generate Database schema from XML Schema?

I am looking to generate a MSSQL schema from an excising industry standard xsd file. Any suggestions on which Tool to use? I have played with XMLspy but I need a little more flexibility in the data type mapping. ...

How to tell whether an XML document validates against a DTD or XSD?

In Java, I can validate an XML document against an XSD schema using javax.xml.validation.Validator, or against a DTD by simply parsing the document using org.xml.sax.XMLReader. What I need though is a way of programmatically determining whether the document itself validates against a DTD (i.e. it contains a <!DOCTYPE ...> statement) or ...

How can one find unknown XML namespaces in a document?

Specifically (taking a deep breath): How would you go about finding all the XML name spaces within a C#/.NET XmlDocument for which there are no applicable schemas in the instance's XmlSchemaSet (Schemas property)? My XPath magic is lacking the sophistication to do something like this, but I will keep looking in the meantime ... ...

XSD: How to depend the "use" attribute (required/optional) with the other value?

Hello, I'm trying to do some specific stuff in XSD XML Schema: I want to set an element as use="required", only if there a specific value to some attribute of other element. Example: <udi att1="all"> <name att2="dsd"/> <phone att3="dsd"/> </udi> I want the that the "phone" element will be a required one, if the "at...