xsd

Providing better WSDL from C# SOAP

I'm pulling together some services in C# that have to match specific data format; e.g. string lengths, various enumerations and formatting. I have the back-up approach to validate post the SOAP call and respond with friendly messages and pre-defined error codes, but I would like to place additional information into the WDSL (so it is cl...

How to find XSD root element in C#

Hello Good day. As i know. There is a root element in XML file. But from the XSD file structure, it is not easy to get the root element value. Is there any method to do it? (I wouldn't like to take use of hard code to find XSD root element value in my project. i want to find the root element of "RootValueHere" <xsd:schema xmlns:xsd=...

Mark element as deprecated in XSD

I have an XSD that's going through a transition from one set of elements to another. During the transition, there'll be code expecting the new elements and code expecting the old elements. Therefore I need to keep the old elements in the XSD; I'm documenting them as deprecated (using free text in an xs:documentation element). Is there a...

what is the difference between XSD and WSDL

Hi what is the difference between an XML Schema and WSDL, I have been reading a lot of stuff, but I still get confused ... The difference I noticed is that WSDL contains XSD and in WSDL we can declare operations, but not in XSD. Is that correct? Thanks for your time and replies, ...

Is there a tool to convert DBIx::Class Schema (or just SQL) to XSD

I am using perl DBIx::Class ORM and would like to be able to dynamically generate an XSD either from the DBIX::Class schema or directly from the SQL DDL. I know it would probably be better that we start with XSD and generate our SQL DDL from the XSD but we are not in a position to do that yet. thanks, Tom ...

XSD Inheritance

Hi, I'm looking for a kind of XSD Inheritance that I'm not quite sure it is possible , So I want to make sure of it :) The thing is I have a complex type A and another complex type B that only differs from A that its attribute has a fixed value. example: <xs:complexType name="A"> <xs:attribute name="AAtrr" type="xs:string"/> </x...

get a list of all schemas referenced in an XML document

In C#, how can I get a list of all XSD schemas referenced in an XML file, including those referenced via xsi:noNamespaceSchemaLocation? ...

Automatically attach XML files to XSD schema in Visual Studio?

I just discovered the beauty of Visual Studio's automatic XSD schema generation.* Is there an easy way to have VS automatically attach files with particular names to existing XSD schema? So if I have myconfig.xml files scattered throughout a project (or several projects) I would want them to always validate against myconfig.xsd, rather...

Presenting xml validation errors

Hi people! I'm trying to do this: I have an XML file that I want to validate according to an XSD file. So far so god... What I have to do is present the all node where is the validation error. For example I have this XML file : <people> <name>Jonh</name> <tel>91991919199191919</tel> </people> When I validate this file, this w...

what's the best way to automate generation of an xsd given an xml sample?

I have a chunk of xml data that's coming out of a database that I need to generate an xsd for. Got it all working using xsd.exe but all the elements are showing up as string, even things like 2079.0200. How do I get xsd.exe to guess at types? Would the XmlSchemaExporter class be able to do this? The issue here is that Visual Studio is ...

How to detect the SimpleType in XSD file? (Updated at Jan 6)

Hello. I am parsing my XSD file. (including some elements, complexTypes and simpleTypes) I want to detect each of them by type property. My xsd file a little like this. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <xsd:element name="mainInfo"> <xsd:complexType> <xsd:sequence> <xsd:element ref="Docu...

Best XSD file generator

Hi, I am analyzing tools that generate XSD file from XML files. I find lot of tools in internet. XSD.exe utility that comes along with Visual Studio (xsd file.xml) Stylus Studio's XSD file generator XSD Interference tool from Microsoft XMLFox Professional Liquid XML Studio (XML Editor reverse engineering) Which of the above is best i...

how to do simple xsd with netbeans

I need to define some schemes for an API whitch have communication sending and receiving xml strings. I want to document the scheme definition to the clients who will user that API. for example <store> <name>the store</name> <products> <product> <id></id> <name></name> <price></price> ...

xsd sequence of any type of element that is an extension of specific complex type.

Basically if this was .NET, it would look like this: ISomething { string A { get; } int B { get; } } var somethings = new List<ISomething>(); something.Add(new SomethingSomething()); something.Add(new AnotherSomething()); something.Add(new AnythingSomething()); Basically I want the sequence of elements to be named anything they w...

HELP ME my dataset xsd content HAS GONE

I'm working in an erp project using Visual Studio 2008 Sp1, I've a typed dataset it was containg alot of datatable and alot of table adapter the .Designer.cs file was 8 MB, suddenly when i was trying to openit using visual studio designer the following code comes to me <?xml version="1.0" encoding="utf-8"?> <xs:schema id="erpDataSet...

What are the best practices for versioning XML schemas?

I often have to design XML schemas for different XML-bases import routines. It is clear that XML schemas will evolve over time or they could contain bugs to be fixed, so it is important to capture the schema's version and to have some mechanism to bind against a specific version. Currently I have two scenarios: The bug is found within...

XSD key/keyref beginner question

I'm trying to implement a very simple XML schema constraint. The idref attribute on elements of type <batz> should only be allowed to have a value that matches the id attribute on at least one element <bar>. If that doesn't make any sense to you then please just look at the example XML-document below, I think it actually ex...

xsd to entity model (ejb3)

Hi there, I wonder if somebody knows if there is a framework somewhere out there tha can convert from XSD to entity model. thank kiu.. ...

Read XML into xsd.exe generated classes. Good idea?

I have a fairly complex XML coming my way and I have the XSD for it. I generated classes via xsd.exe and read XML into the class structure via the XmlSerializer described here. It works great. However, this is the first time I've done it this way and I'll be reading in tons of XML files going forward from various sources. How reliabl...

How to do the Validation of only particular/specific tags in an XML?

I have some code-generated XML. I have written an XSD to validate the XML. I have tags in them XML that do not need to be validated. Is there any way to validate particular tags and skip the others? The example XML is: <person> <firstname>Name</firstname> <lastname>Name</lastname> <tag1>data</tag1> <tag2>data</tag2> <tag3>data</tag3> <...