Home All Groups Group Topic Archive Search About

XmlValidatingReader fails on everything - says cant find top eleme

Author
18 Jan 2006 9:09 AM
martin
I'm trying to use XmlValidatingReader to programatically validate an XML
document according to a given schema. However, no matter what schema/doc pair
I feed into the program I keep getting the same error:

The element my_namespace:my_top_element have not been declared. An error
occured at (2,2).

All of the doc/schema pairs I have tried validate perfectly OK using several
online xml/xsd validators (like for instance this one:
http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx )

I'm using the standard .NET classes for XML and my code looks like this:
http://www.rafb.net/paste/results/xMvX3926.html

Here is one of the XML documents I tried to test with:
http://www.rafb.net/paste/results/FqPvRk85.html
Here is the corresponding schema:
http://www.rafb.net/paste/results/CZ5qkX25.html


Sincerly,
Martin

Author
19 Jan 2006 9:19 PM
Joerg Jooss
Hello Martin,

Show quote
> I'm trying to use XmlValidatingReader to programatically validate an
> XML document according to a given schema. However, no matter what
> schema/doc pair I feed into the program I keep getting the same error:
>
> The element my_namespace:my_top_element have not been declared. An
> error occured at (2,2).
>
> All of the doc/schema pairs I have tried validate perfectly OK using
> several online xml/xsd validators (like for instance this one:
> http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx )
>
> I'm using the standard .NET classes for XML and my code looks like
> this: http://www.rafb.net/paste/results/xMvX3926.html
>
> Here is one of the XML documents I tried to test with:
> http://www.rafb.net/paste/results/FqPvRk85.html
> Here is the corresponding schema:
> http://www.rafb.net/paste/results/CZ5qkX25.html

Hm... those links all seem to be broken. Can you post your code?

Cheers,
--
Joerg Jooss
news-re***@joergjooss.de

AddThis Social Bookmark Button