xsd

XSD key/keyref: hierarchical key structure

I'm trying to define some foreign key constraints on an XML schema using xs:key and xs:keyref definitions. I want the structure of the document to be hierarchical in the following way: <?xml version="1.0" encoding="UTF-8"?> <tns:root xmlns:tns="http://www.example.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLoca...

How do I validate an XML file against a Schema using ant?

As part of my build process I want to validate XML files against a Schema (XSD). I'm trying to use the schemavalidate task like this: <schemavalidate noNamespaceFile="schemas/Model.xsd" file="Model.xml"/> This yields the following error: [...] BUILD FAILED build.xml:65: The following error occurred while executing this line: build.x...

Access xml using Linq when xsd is available

I have an xml file containing a lot of data. The structure of the file derives from several formats I have the xsd files for. They all merge to the schema that completes the view. What is the best way accessing the xml file using linq when I need to get all data and work with it? ...

xsd.exe output filename

Is there a way to control the output filename from xsd.exe? My specific issue is that if an imported xsd is referenced this is added to the filename. ...

Data Integration Approach

Im trying push some data into a CRM system via an XML import. I have XML Schemas for the CRM system (XSD's) which are pretty complex (big files with lots of namesapces), I'm struggling to figure out what the XML should look like and the namesapces are not helping at all. I need an easy way to prototype the XML documents, once I have a...

XSD with imports and namespaces

Hi I am trying to get my mind around XSDs, XML and namespaces but I can't get things to work the way I want them to. I have an XSD which, at the moment, starts like this: <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ex...

In emacs XML mode, how to pretty-format an XML schema file?

I want to automatically format an XML schema definition file. All the normal pretty-print stuff: linebreaks after end-element, indentiing. I have seen this answer, and this elisp, which gives me the basics. Beyond what is there, though, I would like line-breaks between attributes within angle-brackets. Like so. Before: <s:schema el...

How can I run the Delphi XML schema binding generator from the command line?

For build automation, I would like to invoke the XML Data Binding Wizard in Delphi from a build script. I have found the WSDLImp.exe, but this tool seems to generate WSDL based Delphi code only. Is the XML schema binding wizard (which generates Delphi code for XSD files) available as a command line tool? ...

Schema-sensitive editing in emacs, based on W3C XML Schema? (not RNG)

I just learned, here, about nxml-mode, which, according to the README, is a major mode for GNU Emacs for editing XML documents. It supports editing well-formed XML documents and also provides schema-sensitive editing of XML documents using RELAX NG Compact Syntax. Is there a mode that does the same for W3C XML Schema? I...

How to generate Pascal code from an XML schema in Delphi Prism?

I need to import some XML schemas. In Delphi, I would use the the XML Data Binding Wizard to generate the Pascal code from the schemas. Is there something like that in Delphi Prism to avoid writing all this boilerplate code? ...

Free tool to convert XSD to HTML

Is there good freeware tool that will help me convert XSD to HTML? Thanks, Jerry ...

how to reference XSD Schema location while parsing XML Doc via SAX Xerces?

how to reference XSD Schema location while parsing XML via SAX Xerces? < ?xml version="1.0" encoding="ISO-8859-1"?> < com.firma xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > < !-- xsi:noNamespaceSchemaLocation="F:\...\myschema_v2.5.xsd" Must I reference this element really within the XML Doc??? I hope, not... ...

Xsd validation problem

Hi, I have the following (errorous) Xml: <jobs> <job> <id>1</id> <state><![CDATA[IL]]></state> </job> <job> <id>2</id> </job> </jobs> both the id and the state node are reqired items. I wrote an Xsd for it: <?xml version="1.0" encoding="utf-8"?> <xs:schema id="importvalidator" elementFormDe...

Can I create an XSD schema that places an attribute on all complex types?

I would like to create an XSD that defines an attribute which can be placed on elements from other schemas, or elements that are not in any schema. For example, the schema would look something like this: <xs:schema id="MySchema" targetNamespace="http://tempuri.org/MySchema" elementFormDefault="qualified" xmlns="http://tempu...

Validating Xml with Xsd

I'm running into real difficulties validating xml with xsd. I should prefix all of this and state up front, I'm new to xsd and validation, so I'm not sure if it's a code issue or an xml issue. I've been to xml api hell and back with the bajillion different options and think that I've found what would be the ideal strategy for validating ...

how can I define an xsd file that allows unknown (wildcard) elements?

I'm receiving an xml message with unknown variable name elements... that is, they are not predefined... I only know there can be 0 or more of those elements, allong with some other that are mandatory... for example <root> <service>my service</service> <resource>my resource</resource> <action>update</action> <parameters...

Design decision - Almost Identical XSDs

I have an XSD - it is designed to allow clients to my webservice to send XML data in a structured and robust way (that's the whole point of XSDs right?). However I am designing some other part of the system and was going to use this XSD because it does 99.999999% of what I need it to do - it has all the data I could ever want - except i...

Validate XML against XSD software

What graphical software do you recomend to validate a XML file against XSD definition file? ...

Can a column be added to a record using XSD through SQLXMLBulkLoad?

I have a SQL Dts job pull an XML file and doing a SQLXMLBulkLoad using an XSD file. Is there a way to specify in the XSD to append a static string column to every record of a certain table? ...

Visual Studio 2008 custom config xsd intellisense auto complete broken!

Hi, I used to use the intellisense feature within visual studio 2003 for editing a custom .config file against my custom xsd schema. I put the schema in: Common7\Packages\schemas\xml Everything worked happily, no problem. I have just tried to do the same in VS 2008 and there is no intellisense. The schema viewer for the .config file...