I would like to have an XML file conform to an XSD file however I am faced with a small problem. How can I enforce existence of a certain element but at the same time not enforce the order of elements. Using all, choice, or sequence does not allow me to do this. For example... assume the pseudo...
Could you elaborate?
I have the XML document root node containing...
xmlns="http://tempuri.org/XMLFile1.xsd"
and the XSD document containing...
targetNamespace="http://tempuri.org/XMLFile1.xsd"
Is that what you meant? I still get the message Visual Studio cannot locate the schema for...
I'm not sure that I understand your reply. Shouldn't the Validate XML Data option from the XML menu work? I would imagine there is a more simple way to validate XML against an XSD rather than utilizing the XmlValidatingReader class.
Can anyone tell me how to get an XML document to validate against an XSD file in Visual Studio .NET? From the XML menu, when selecting Validate XML Data, I always get errors stating that Visual Studio cannot locate my schema. I'm not sure that I know how to use the namespaces correctly so this...
Hi everyone,
Does Visual Studio .NET 2003 support the editing of XML documents and validating that document against an XSD schema file? If so, how can this be done?
Thanks!
Hi everyone,
The choice indicator in an XSD - does it mean that either one type of element can occur or another but NOT both? Or one type of element can occur or another and even both types?
Thanks!
When using the "exention base=" notation, is there a way to specify default values for the lowest level (that inherits from the parent/base)? In other words, can I overwrite values that were specified at the base for children?
Example:
parent
val1 default = 1
child base=parent
val1...
Does anyone know of any tools out there that will build a user interface based on an XML schema (and/or sample file) that will allow users to enter/modify/delete XML data?
Hi everyone,
Does anyone know/recommend any good tools/methods that can extract data from a SQL Server database and, given an XML schema, populate an XML file?
Thanks!
When creating an XSD schema, what is better to use: references or named types?
The XML I am working with has recursion in it, making both approaches possible. But which one is better and why?
XML EXAMPLE:
<root>
<type a>
<type a>
...
<type b>
<type b>
<type a>
...
Hi everyone,
I have been wrestling with XML namespaces... Why do XML schemas require namesspaces? What do they do?
But most importantly... How can I include a valid working namespace? Do I have to define one?
Thanks!
Could this also be done using named types...
complexType name = typeB
...
complexType
complexType name = typeA minOccurs = 0 maxOccurs = unbounded
...
element type = typeB
complexType
complexType name = root
element type = typeA minOccurs = 0 maxOccurs = unbounded
complexType...
Hi all,
I am trying to create an XSD for an XML file with multiple "unknown" levels. What I mean is that the XML file I am working from has a single root node that contains many nodes of type A. All Nodes of type A can contain additional type A nodes and also type B nodes. These type A nodes...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.