473,372 Members | 1,008 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

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 1339
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 XmlValidatingReader 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 XmlValidatingReader to validate is at:
http://msdn.microsoft.com/library/de...ithschemas.asp

Thanks,
Zafar

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
in message news:22**********************************@microsof t.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 XmlValidatingReader 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 XmlValidatingReader 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 XmlValidatingReader to validate is at:
http://msdn.microsoft.com/library/de...ithschemas.asp

Thanks,
Zafar

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
in message news:22**********************************@microsof t.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
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...
8
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. ...
6
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,...
0
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...
0
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...
16
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...
7
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
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...
1
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.