TechTalkz.com Logo Ask the Experts!

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > VB.NET

Determining an XMLNode's Schema Type

VB.NET

 
 
Thread Tools Display Modes
Unread 14-10-2007, 03:07 PM   #1
Bubba
Guest
 
Posts: n/a
Determining an XMLNode's Schema Type

Hi All,

I'm presently populating a DataGridView with data extracted from an XML
file, but since there is a range of datatypes I thought it would make
more sense to have a CheckBox cell for a boolean datatype, or a combobox
cell for an enumeration etc.

However, the xmlnode (extracted from the xmldocument) used to create the
row in the datagridview doesn't contain any schema information! This is
confusing me as both the XML schema and document are validated by the
application at startup. If I put a 'bad' value into an xmlnode I get a
validation error as one would expect.

Does anyone know how to match an XmlNode to it's underlying schema datatype?

--
Bubba

 
Unread 15-10-2007, 06:03 AM   #2
Cor Ligthert[MVP]
Guest
 
Posts: n/a
Re: Determining an XMLNode's Schema Type

Bubba,

Will you be so kind to set ANN: in your subject next time, now people are
opening your message several times while they think it is an unanswered
question.

(To prevent the reopening everytime as well)

Cor


 
Unread 15-10-2007, 08:05 AM   #3
Bubba
Guest
 
Posts: n/a
Re: Determining an XMLNode's Schema Type

Cor Ligthert[MVP] wrote:
> Bubba,
>
> Will you be so kind to set ANN: in your subject next time, now people
> are opening your message several times while they think it is an
> unanswered question.


It is an unanswered question! Sorry I don't quite follow what you mean.

--
Bubba
 
Unread 15-10-2007, 01:09 PM   #4
Martin Honnen
Guest
 
Posts: n/a
Re: Determining an XMLNode's Schema Type

Bubba wrote:

> However, the xmlnode (extracted from the xmldocument) used to create the
> row in the datagridview doesn't contain any schema information! This is
> confusing me as both the XML schema and document are validated by the
> application at startup. If I put a 'bad' value into an xmlnode I get a
> validation error as one would expect.


The SchemaInfo property
<URL:http://msdn2.microsoft.com/en-us/library/System.Xml.XmlNode.SchemaInfo.aspx>
should help. If not then please show us your code setting up the
XmlDocument, if you use an XmlReader with the proper XmlReaderSettings
passed to the Load method then the DOM nodes should have schema info
associations.


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
 
Unread 15-10-2007, 03:17 PM   #5
Bubba
Guest
 
Posts: n/a
Re: Determining an XMLNode's Schema Type (Fixed)

Bubba wrote:
> Hi All,
>
> I'm presently populating a DataGridView with data extracted from an XML
> file, but since there is a range of datatypes I thought it would make
> more sense to have a CheckBox cell for a boolean datatype, or a combobox
> cell for an enumeration etc.
>
> However, the xmlnode (extracted from the xmldocument) used to create the
> row in the datagridview doesn't contain any schema information! This is
> confusing me as both the XML schema and document are validated by the
> application at startup. If I put a 'bad' value into an xmlnode I get a
> validation error as one would expect.
>
> Does anyone know how to match an XmlNode to it's underlying schema
> datatype?
>


Hi I've managed to fix this, I was using a bad XPath.

Thanks for your help.

--
Bubba
 
Unread 15-10-2007, 05:12 PM   #6
Cor Ligthert[MVP]
Guest
 
Posts: n/a
Re: Determining an XMLNode's Schema Type

Bubba,

My excuse, I was writing this, however added it to your message.

Cor

 
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE7 Vista - Determining 256 bit AES Bathrone Windows Security 3 13-02-2009 07:50 PM
Determining the MIME type of a file Nathan Sokalski VB.NET 1 05-09-2007 09:21 AM
IE7 Vista - Determining 256 bit AES Bathrone Windows Security 2 28-08-2007 06:52 AM
Help determining what to do with files chikbrite Windows Security 1 28-08-2007 06:41 AM
Determining who is logged into a PC JohnB Windows Server 2003 16 28-08-2007 02:43 AM


< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT. The time now is 12:46 PM.


vBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2013, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional