473,699 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Having trouble with validating XML against XSD

I can get an app to work with XmlValidatingRe ader but of course that is
"obsolete".
I'd prefer not to use an obsolete class if possible.

However, when I instead used XmlReader as suggested, my program hangs at the
line.

myXmlReader.Set tings.Validatio nType = ValidationType. Schema;

I don't get a useful exception - it's a WinFX program and I get a BAML
exception in the main window.

In theory simply setting a property shouldn't cause this much carnage but
who know what code is behind the scenes.
Is anyone else suffering a similar problem ? Is it a known issue ?

--
Griff
(trying to make an industrial UI with XAML/WPF/c#)
Feb 9 '06 #1
1 1079
Can you post your code and xml/xsd files?

--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Griff" <Gr***@discussi ons.microsoft.c om> wrote in message
news:F8******** *************** ***********@mic rosoft.com...
I can get an app to work with XmlValidatingRe ader but of course that is
"obsolete".
I'd prefer not to use an obsolete class if possible.

However, when I instead used XmlReader as suggested, my program hangs at
the
line.

myXmlReader.Set tings.Validatio nType = ValidationType. Schema;

I don't get a useful exception - it's a WinFX program and I get a BAML
exception in the main window.

In theory simply setting a property shouldn't cause this much carnage but
who know what code is behind the scenes.
Is anyone else suffering a similar problem ? Is it a known issue ?

--
Griff
(trying to make an industrial UI with XAML/WPF/c#)

Feb 10 '06 #2

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

Similar topics

1
456
by: davisjoseph | last post by:
Hi All, I'm using Xerces C++ 2.50 DOM version for Validating a valid XML againt the Schema(XSD) available; But it always shows an error in XSD I suppose; This is the error I'm getting using DOMError : Value 'The type of the operation for this entity.' is NOT a valid URI Value ' 1 = Allow 2 = Agree 4 = Deny' is NOT a valid URI; Here '1 = Allow 2 = Agree 4 = Deny' these are enumerated values in XSD.
9
1392
by: scott | last post by:
I have a style variable below that I can't figure correct quotes for in response.write line. Any help? CODE: sTeamVisible = "visibility: visible;" Response.Write "<td class=""teamdrop1"" style=""" & sTeamVisible & """ & " "
4
2407
by: Jon Poploskie | last post by:
Hello, I have an xsd file that I'm trying to use to validate some xml against. I'm hoping this is a simple problem, but I just don't see it. I get the error "The 'role' element is not declared." when trying to validate this xml: <users> <user id="jon" pwd="pass"> <roles><role>Admin</role></roles> </user>
6
2421
by: Iain | last post by:
I've got a system which takes an XML file, translates it into an update gram and then loads it into my database with SQLXML3 (all in dot net). But it's fragile. And the SQLXML 3 error reporting is not absolutely wonderful. So what I want to do is to validate it before I upload it. When I try and do this I get MILLIONS of errors (well lots) complaining about elements like ROOT which are part of the
1
4331
by: Christian | last post by:
Hi, I load an Xml-file "customers.xml" into a DataSet (works fine) but then how do I validate it against a schema (e.g. customers.xsd) ? my customers.xml: <?xml version="1.0" encoding="utf-8"?>| <customers xmlns="http://tempuri.org/customers.xsd"> <Customer ID="1000"> <FirstName>Greg</FirstName>
3
6057
by: Shailendra Batham | last post by:
hi guys I need your suggestions / opinion for doing this the right way. I have a XML and a Schema for the same What I want is when its validated against the schema, it should give custom errors saying what happened and where...... is it possible to do that ? for eg. if the Attribute is missing or invalid in the following element <Watch ID="999d999">
1
649
by: Cesar | last post by:
Hello, I've developed a .NET C# web service; which has one method named, let's say, upload_your_data. This method has one parameter ( string your_data). The value that this parameter will actually have is the content of a XML document. This data will be processed and check for a well-formed xml document and will be validated against a XSD. Before putting my code, let me go on and explain the whole situation. This web method is invoked...
2
7175
by: josh | last post by:
Hi, I am trying to validate cXML documents against cXML.dtd using the XmlValidatingReader. If I set the XMLValidatingReader's ValidatingType to ValidationType.DTD, I get the following System.Xml.Schema.XmlSchemaException: "The parameter entity replacement text must nest properly within markup
8
1936
by: cutlass | last post by:
Need you assistance to anyone who is willing to offer. I have been working on this script and can't get it to work. The issue I'm having is the statement: function validateSender($Address) { if (strpos($Address, '@') !== FALSE && strpos($Address, '.') !== FALSE) { return true; } else if (validateSender($_GET) == false) {
7
4239
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
I wrote a method to validate and xml file against a schema. If the file does not conform to the schema, it throws an error. It works fine except for one curious thing. If I try to validate an XDocument (containing schema xml) against a schema url, it validates successfully..... Has anyone ever seen this before or know why it does this. Here is the code:
0
8706
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
9199
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
9055
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
8902
tracyyun
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...
0
7787
agi2029
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...
0
5889
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
4392
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
4641
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2366
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.