I have generated an XSD file from an XML snippet using xsd.exe /out
What its done is created maxOccurs="unbounded" properties for certain elements.
If I only want the element to appear once, and not be a collection do I set the maxOccurs like this?
maxOccurs="1"
Thanks
...
I am trying to generate C# code from an XSD using xsd.exe
Here is a snippet of the problematic area
<xs:element name="EmailConfiguration" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="DefaultSendToAddressCollection" minOccurs="0" maxOccurs="1">
<xs:complexType>
...
Is there a way to refer to a group of non-nested XML tags in XSD schema, e.g.:
<foo>
<a>a_val</a>
<b>b_val</b>
<c>c_val</c>
<d>d_val</d>
</foo>
<bar>
<e>e_val</e>
<b>b_val2</b>
<c>c_val2</c>
<f>f_val</f>
</bar>
What I want to achieve is to have tags <b> and <c> extracted separately as complexType or abstract elemen...
Edit: I don't think I asked this question very well. I'm completely re-phrasing it
All:
I am trying to represent the following XML in XSD (I'm working with the Visual Studio XSD editor, as I really don't know XSD very well).
Here's the XML:
<TheParentNode>
<AnElement ID="x">123</AnElement>
</TheParentNode>
I want to specify tha...
Visual Studio 2005 has an excellent visual XSD editor:
In VS 2008 I cannot find it anymore ...
...
Is there any reason why <xs:group> cannot appear inside <xs:all>, but only inside <xs:sequence>?
Let's see an example. Say, there is a list of tags (<a> to <d> and <e> to <f> - see example below) which do not appear in any particular order, but always wrapped into another object (either <foo> or <bar>); <foo>={<a>, <b>, <c>, <d>}; <bar>...
I've been looking around for a way to programmatically parse XSD files to generate an XML mapping so that I can take any XSD file and create a parser that will parse any XML file that conforms to it, and my google-fu has been coming up short.
XSOM looks promising, as it will parse an XSD file and make all its attributes available in a ...
I've always found validation against a schema to be an invaluable ward against thinkos and would like to incorporate validation checks as part of a project where I frequently need to hand-write XML files a few hundred lines in length. My text editor has a fairly nice CLI integration feature, so I'm looking for a command-line validator.
...
I'm trying to create a treeview in a VB 2008 project that shows all the elements and attributes of an XML Schema.
The MSDN documentation for XML schemas seems to imply that by loading the schema into an XMLSchemaSet and compiling it I should get access to all the elements and attributes with their values but this doesn't seem to work in...
In Java EE 1.4 using JAX-RPC 1.1, how can i expose web service, so the wsdl has a complex type (person) where one of the properties of the person is a date which is shown in the WSDL/XSD as only a date (such as a birthdate) instead of a dateTime (where the time is not wanted) in the WSDL/XSD?
i would like the xsd referenced in the wsdl ...
I'm writing a xml schema (a xsd) to describe the format our partners should send us data in.
And I'm havening a hard time find a tool that can validate the xsd file that i have written.
The best way I have found so far is to write an example input xml file and try to validate that with the xsd. But that doesn't feel like a best practic...
I have an application which saves documents (think word documents) in an Xml based format - Currently C# classes generated from xsd files are used for reading / writing the document format and all was well until recently when I had to make a change the format of the document. My concern is with backwards compatability as future versions ...
Halo
I'm sure this question has been asked many times in the past, but I'm having a nightmare with it.
I have a set of XSD schemas with a tonne of complex types. One of them is this:
<complexType name="commandType">
<sequence>
<choice>
<element name="check" type="epp:readWriteType"/>
</choice>
</sequence>
</complexT...
Hey,
im searching for the best solution of my xml schema (xsd)
I have an response:
<xs:element name="exampleCatalogResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="meta" type="tns:metaType" />
<xs:element name="data" type="tns:defaultDataType" />
</xs:sequence>
</xs:complexTyp...
I've created in my application the ability for developers to create WPF forms by writing an XML file.
I would like to now write a XML Schema file (.xsd) to validate this XML file so that developers can validate their Form XML before it is put into the system, and so they can get intellisense based on the XML Schema while they develop it...
I want to be able to guarantee uniqueness for two types of elements : MainQuestion and AlternateQuestion.
In the select query for my xsd:key, can I specify something that would do "//MainQuestion or //AlternateQuestion"? Someone told me that something like this existed, but it seems that XSD only supports a subset of the XPath syntax......
I have been trying to do this as the last stage in a standalone application to convert from the file format used by a modeling program to an EMF model. I am able to convert the original format to XSD, which I can manually convert to an EMF model using the Eclipse importer, but I do not know how to do this programmatically to automate the...
Is there a function, class, or extension in PHP that can handle the XSD datetime format?
It's a standard XML date & time format, that looks like this:
<date>2008-02-28T07:56:35.263</date>
I know I can read it with a regular expression, if no solution is given, I'll default to that.
Thanks!
PS: Solved, look at the answers.
...
I have an XSD definition that has a list of tagged elements. In what way is it possible to allow developer's to only select from a list of elements already defined in the XML file when entering values for a choice-restricted element?
In other words, given this XML declaration:
<collection>
<myItem name="Item_1">
<childEle...
Is it possible using XSD to restrinct node names to enumeration, and then based on this enumeration add another restrictions?
In example, I have this xml:
<a>
<b name="string" value="hello">
<b name="integer" value="123">
</a>
I want "b" nodes have name attribute from enumeration { "string", "integer" }.
Then if it's "string"...