473,748 Members | 2,887 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find records that do not conform to schema

We have an application right now that determines if an XML document sent in
conforms to schema. What we have now been asked to do is add functionality
that creates an exception report for all records that do not conform to our
schema (XSD). One of the team members has built some functionality that loops
through the records, node by node, and determines which nodes do not conform,
but it is taking way too long to develop.

Does anyone know a quicker way to develop this with the .NET XML classes? We
are at brainstorming stage, so any ideas are potential winners.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************
Nov 12 '05 #1
2 1358
Xml Schema validation would be a good solution for your problem.

Given an XML document, and a XSD Schema document it needs to conform to, you
can use the XmlValidatingRe ader class in .NET 1.1 (XmlReader class in .NET
2.0 beta2) to read the document and associate it with the corresponding
schema. The reader goes through the documents and reports all errors it
encountered through an exception handler which also has line number and line
position information and also a good descriptive error message of what the
problem was. You could use this handler to construct your error report for
the data.

more details on how to use XmlValidatingRe ader to validate is at:
http://msdn.microsoft.com/library/de...ithschemas.asp

Thanks,
Zafar

"Cowboy (Gregory A. Beamer) - MVP" <No************ @comcast.netNoS pamM> wrote
in message news:22******** *************** ***********@mic rosoft.com...
We have an application right now that determines if an XML document sent in conforms to schema. What we have now been asked to do is add functionality
that creates an exception report for all records that do not conform to our schema (XSD). One of the team members has built some functionality that loops through the records, node by node, and determines which nodes do not conform, but it is taking way too long to develop.

Does anyone know a quicker way to develop this with the .NET XML classes? We are at brainstorming stage, so any ideas are potential winners.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************

Nov 12 '05 #2
Thank you for your response.

I was planning on looking at the XmlValidatingRe ader as at least part of the
solution. I briefly examined the documenation, but did not see the list of
exceptions portion. I guess I need a more complete study.

As long as I can discover bad nodes (exceptions) and walk up to get the node
for the entire record, it should fit very nicely with the application. Thank
you again for your quick answer.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************
"Zafar Abbas" wrote:
Xml Schema validation would be a good solution for your problem.

Given an XML document, and a XSD Schema document it needs to conform to, you
can use the XmlValidatingRe ader class in .NET 1.1 (XmlReader class in .NET
2.0 beta2) to read the document and associate it with the corresponding
schema. The reader goes through the documents and reports all errors it
encountered through an exception handler which also has line number and line
position information and also a good descriptive error message of what the
problem was. You could use this handler to construct your error report for
the data.

more details on how to use XmlValidatingRe ader to validate is at:
http://msdn.microsoft.com/library/de...ithschemas.asp

Thanks,
Zafar

"Cowboy (Gregory A. Beamer) - MVP" <No************ @comcast.netNoS pamM> wrote
in message news:22******** *************** ***********@mic rosoft.com...
We have an application right now that determines if an XML document sent

in
conforms to schema. What we have now been asked to do is add functionality
that creates an exception report for all records that do not conform to

our
schema (XSD). One of the team members has built some functionality that

loops
through the records, node by node, and determines which nodes do not

conform,
but it is taking way too long to develop.

Does anyone know a quicker way to develop this with the .NET XML classes?

We
are at brainstorming stage, so any ideas are potential winners.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
1856
by: Steve Jorgensen | last post by:
Terminology question: Is there a term for a set of records related directly or indirectly by key value in several tables? For example, a single invoice record and its line item records -or- a single customer, the customer's orders, the order lines for those orders, the customer's invoices, and the invoice lines for those invoices. I'm thinking the term might be graph, but I'm not at all certain of this.
8
4336
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. Basically I want to say: If fk_ID is in list then do these statements to that record
6
2425
by: Jeff Kowalczyk | last post by:
I need to adapt this an update statement to a general form that will iterate over multiple orderids for a given customerinvoiceid. My first concern is a form that will work for a given orderid, then an expanded version that will work on all orderids with a specific customerinvoiceid as a parameter. I'm sure appropriate joins will handle it, but I'm not making any headway, everything comes back with multiple tuple selected for update...
0
11270
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema information for the". I am using Cassini as the web server on my PCand I can still run my site from within VWD. Does anyone know what I have done to cause these messages to appear? Could not find schema information for the element...
0
7813
by: jhansen | last post by:
I am getting informational warnings about the following app.config and indicate the following. I am using C# visual studio 2005 and used the Settings.settings to set up my values scoped as application. How do I clear up these informational warnings? The 'requirePermission' attribute is not declared. Could not find schema information for the element 'applicationSettings.' Could not find schema information for the element...
16
3524
by: TT (Tom Tempelaere) | last post by:
Hi all, I created an XSD to define the structure of an XML file for my project. I made an XML file linked to the XSD using XmlSpy. The problem is that if I read the file using .NET XmlDocument and then query for the root element, the result is always null (1). However if I strip the root element of all attributes generated by XmlSpy, then there is no problem to find the root element with .NET XML classes (2). (1) The XML for which...
7
18308
by: Laurence | last post by:
Hi folks, Who knows how to retrieve the owner of SQL objects, such as SCHEMA, TABLE etc.? Is GRANTOR within catalog view owner? Thanks, Laurence
24
21636
by: Frank Swarbrick | last post by:
We have a batch process that inserts large numbers (100,000 - 1,000,000) of records into a database each day. (DL/I database.) We're considering converting it to a DB2 table. Currently we have logic in place that, prior to inserting any data, reads the first input record and checks to see if it already exists in the table. If the record already exists there are two options: 1) Don't continue, because you already ran this job today! 2)...
1
1730
by: Christopher M. | last post by:
I'm exporting XML from Access. There is an option to not export key and index information to a schema (XSD) file, but there's no option for the XML file. What I've been doing is using editors like AttEdit and XMLSpy to edit the XML by removing the keys so it conforms to an existing schema. I'm having a problem though. I have a bunch of child elements, and I'm trying to modify some elements of these child elements, but it seems that I...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
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,...
0
9544
Oralloy
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...
0
9372
jinu1996
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...
0
4606
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...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
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
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.