Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

Determining an XMLNode's Schema Type

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bubba - 14 Oct 2007 15:07 GMT
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?

Signature

Bubba

Cor Ligthert[MVP] - 15 Oct 2007 06:25 GMT
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
Bubba - 15 Oct 2007 08:12 GMT
> 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.

Signature

Bubba

Cor Ligthert[MVP] - 15 Oct 2007 17:58 GMT
Bubba,

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

Cor
Martin Honnen - 15 Oct 2007 13:41 GMT
> 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.

Signature

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/

Bubba - 15 Oct 2007 15:35 GMT
> Hi All,
>
[quoted text clipped - 11 lines]
> 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.

Signature

Bubba


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.