473,698 Members | 2,302 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSD validation

When I edit a XSD in Visual Studio.NET 2003, I get the schema of the XSD in
case the XSD is in the correct format....else an error message is displayed
with the problematic line number and location etc. Is there any way to
perform such checks through some .NET library in System.Xml namespace.
System.Xml.Sche ma.XmlSchema has a Compile() method...but it only works if u
build a XSD file .....what if I already have an XSD file and want to
validate it?

TIA,
-Aayush
Nov 12 '05 #1
4 5017
See http://www.w3.org/2001/XMLSchema.xsd for the schema for XSD.

-Dino

"Aayush Puri" <aa****@nospam. com> wrote in message
news:uo******** ******@TK2MSFTN GP12.phx.gbl...
When I edit a XSD in Visual Studio.NET 2003, I get the schema of the XSD in case the XSD is in the correct format....else an error message is displayed with the problematic line number and location etc. Is there any way to
perform such checks through some .NET library in System.Xml namespace.
System.Xml.Sche ma.XmlSchema has a Compile() method...but it only works if u build a XSD file .....what if I already have an XSD file and want to
validate it?

TIA,
-Aayush

Nov 12 '05 #2
See http://www.w3.org/2001/XMLSchema.xsd for the schema for XSD.

-Dino

"Aayush Puri" <aa****@nospam. com> wrote in message
news:uo******** ******@TK2MSFTN GP12.phx.gbl...
When I edit a XSD in Visual Studio.NET 2003, I get the schema of the XSD in case the XSD is in the correct format....else an error message is displayed with the problematic line number and location etc. Is there any way to
perform such checks through some .NET library in System.Xml namespace.
System.Xml.Sche ma.XmlSchema has a Compile() method...but it only works if u build a XSD file .....what if I already have an XSD file and want to
validate it?

TIA,
-Aayush

Nov 12 '05 #3
If you have an XSD file following will validate it:

XmlSchemaCollec tion col = new XmlSchemaCollec tion();
coll.Add(null, filename);

Yan

"Dino Chiesa [Microsoft]" <di****@online. microsoft.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
See http://www.w3.org/2001/XMLSchema.xsd for the schema for XSD.

-Dino

"Aayush Puri" <aa****@nospam. com> wrote in message
news:uo******** ******@TK2MSFTN GP12.phx.gbl...
When I edit a XSD in Visual Studio.NET 2003, I get the schema of the XSD

in
case the XSD is in the correct format....else an error message is

displayed
with the problematic line number and location etc. Is there any way to
perform such checks through some .NET library in System.Xml namespace.
System.Xml.Sche ma.XmlSchema has a Compile() method...but it only works if

u
build a XSD file .....what if I already have an XSD file and want to
validate it?

TIA,
-Aayush


Nov 12 '05 #4
If you have an XSD file following will validate it:

XmlSchemaCollec tion col = new XmlSchemaCollec tion();
coll.Add(null, filename);

Yan

"Dino Chiesa [Microsoft]" <di****@online. microsoft.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
See http://www.w3.org/2001/XMLSchema.xsd for the schema for XSD.

-Dino

"Aayush Puri" <aa****@nospam. com> wrote in message
news:uo******** ******@TK2MSFTN GP12.phx.gbl...
When I edit a XSD in Visual Studio.NET 2003, I get the schema of the XSD

in
case the XSD is in the correct format....else an error message is

displayed
with the problematic line number and location etc. Is there any way to
perform such checks through some .NET library in System.Xml namespace.
System.Xml.Sche ma.XmlSchema has a Compile() method...but it only works if

u
build a XSD file .....what if I already have an XSD file and want to
validate it?

TIA,
-Aayush


Nov 12 '05 #5

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

Similar topics

21
3910
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email adresses and so on. I thought it might be a better way to programm an automated, dynamic form validation that works for all kinds of fields, shows the necessary error messages and highlights the coresponding form fields.
2
2148
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...
4
2612
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. How can I use both? Thank you, Tim Meagher
14
6299
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2) show the error message next to the control. For example, if the text field is empty with RequiredField Validator control, it can show the value in ControlToValidate property in two ways as I mentioned. Please advise. Thanks!
6
2410
by: Stephen | last post by:
Hi, the validation controls dont work on Netscape or Mozilla and only on Internet Explorer why? How do i correct this problem? Thanks
7
2047
by: Ryan Ternier | last post by:
We're running a site that has required field validation on the login page. It works fine on our development / test machines. However, when I upload this site to our live server i get this error. In IE, the validation works, but no form ever gets submited. It doesn't even process the click event of the button. In mozilla, it works 100% (this is weird because it's usually the oposite). Any thoughts?
5
3241
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and I use an argument to difference between an 'edit' vs. and 'add. But since I have field validation on both 'footer' and 'edit' columns I can't submit my edits since the footer validation kicks in.If I take the validation off then the both work fine...
4
2971
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are linkbuttons which must not cause validation. I have found a setting "causeValidation" to disable the validation. Also on the page, I have a datagrid that I will edit lines on. I can click
2
4509
by: dustbort | last post by:
I recently had a problem where my required field validator stopped working. But, the page still posted back and tried to insert a record into the database without performing server-side validation. I discovered that there was no aspnet_client folder in the root of my IIS Web site, and when I ran "aspnet_regiis -c", client-side validation was working again. However, what I don't understand is why the required field validator did not...
6
3355
by: Jon Paal | last post by:
validation doesn't fire what's missing ????? /////// ---- code -----/////////////////////////// Sub btnSubmit_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) 'Handles btnSubmit.Click If page.isValid then ..... end if
0
8674
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
9157
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
9028
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...
1
6518
isladogs
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...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
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...
1
3046
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
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
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.