I'd like to know if there is support in .NET to
somehow "flatten" a nested XML schema.
Here is the situation:
Currently I have code that can validate nested XML
against a schema. The XML is generated by using a DataSet.
Now I want to generate the XML as non-nested from the
DataSet by setting the flag Nested to false in the
Relation objects but still be able to validate it using
the same "nested" schema. So I'm hoping there is a way to
do a similar trick with a schema, load it and set som
nested flag to false and then be able to use it for
validation. 1 1823
I don't know of any automatic option, but if you control the schema then you
need to make sure that all elements that were previously only defined tp be
nested elements are also valid as top-level elements. If you're using the
DataSet to generate the XML in the first place, can you extract some
"reference data" and extract the Schema you validate against from the
DataSet and then add the necessary top-level elements?
--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor
"Anders Nilsson" <an************ @datainnovatore n.com> wrote in message
news:01******** *************** *****@phx.gbl.. . I'd like to know if there is support in .NET to somehow "flatten" a nested XML schema. Here is the situation: Currently I have code that can validate nested XML against a schema. The XML is generated by using a DataSet. Now I want to generate the XML as non-nested from the DataSet by setting the flag Nested to false in the Relation objects but still be able to validate it using the same "nested" schema. So I'm hoping there is a way to do a similar trick with a schema, load it and set som nested flag to false and then be able to use it for validation. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: joes |
last post by:
Hello there
I tried for several days to get a simple validation with xml schema &
xerces working. Goal for me is tuse JAXP and not specific Xerces
classes. I don't get the point what I am doing wrong. Could somebody
help me? I didn't find any full example working on the net. Thank you
for any hints!
If I run the examples below, the parsers parses the file well, no
vlaidation is occuring although the schema and xml file does not
|
by: wumingshi |
last post by:
Hi,
When validating an XML instance, sometimes the schema is not enough to
expression the validation rules. Additional validation rules may be
expressed in an application-specific way. For example, using XPath or
Java method. So is there a concept and/or standard for post-schema
validation or application validation? Is there any hook in XML
standards that allow me to hook up with my customized validation?
Additionally and more...
|
by: Shone |
last post by:
I would like to perform a 2-pass XML reading from a stream. Once using
the Validating reader, just to confirm the validity against the
schema, and next time to do a reading to extract the data. Actually,
second time I do a deserialization, the data from XML is fed directly
to an object.
The problem I am experiencing is the error at the second reading
attempt, and error description implies that reader is winded to the
end of the XML and...
|
by: Dan Bass |
last post by:
There's an XML message I have, that has no namespace information.
Then there is a XSD schema that is must validate against, but this has a
targetNamespace and xmlns of "http://www.wbf.org/xml/b2mml-v02".
How do I get this XML to validate against the Schema in C#?
If I use XmlSpy (2005 home edition) to perform the validation, it first
inserts namespace and schema information into the XML before validating.
Validation then seems to work if...
|
by: Ali |
last post by:
I am having problem compiling schema contained in WSDL file when analyzing
schema types contained in it (for example
http://www.ebout.net/net/GoogleSearch.wsdl).
Following code demonstrates my problem:
using System.Diagnostics;
using System.IO;
using System.Xml;
using System.Xml.Schema;
| |
by: billa1972 |
last post by:
Hi,
I am trying to hook into Yellow Freight's rating webservice. Below is the
wsdl. When i try and create a proxy file with wsdl.exe i get the following
errors, see below.
Also, when i reference this wsdl in .NET it seems to do it fine, yet there
are no objects to reference except RateQuoteBeanService.
In the WSDL it looks like there should be getRateQuote, and QUOTEREQUEST, etc.
|
by: Ben |
last post by:
So, at my place of employment, we use a national standard to transmit
data between certain applications. This standard consists of a fixed
width, flat file 4500-some-odd chars wide that contain 375-some-odd
columns (Not delimited). This standard is not changing anytime soon, so
I attempting to write a library of some sort to read and write these
files within our SQL databases (which use 160 of those columns, but
completely ignore the...
|
by: Mark Parter |
last post by:
I'm trying convert an XML Schema
(http://www.elframework.org/projects/xcri/efc_r1.0.xsd/view) to a VB.Net
class using the XSD tool provided with the .NET 2 SDK. However, it's failing
to generate the class and is outputting the following error(s);
Schema validation warning: Undefined complexType
'http://purl.org/dc/elements/1.1/:SimpleLiteral' is used as a base for
complex type extension. Line 433, position 5.
Schema validation warning:...
|
by: Mark |
last post by:
Hi...
I've been trying the .Validate() method on the XmlDocument to validate some
xml against a schema, but one thing I noted was that unless the document
explicitly declares the schema as a default namespace, Validate() just lets
it slide through as a success.
Is there a way to Validate() either a) mandating against a particular
schema, or at the very least b) supplying a default namespace to be used even
when not explicitly declared?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |