![]() |
|
|
|
#1 |
|
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 |
|
|
#2 |
|
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 |
|
|
#3 |
|
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 |
|
|
#4 |
|
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/ |
|
|
#5 |
|
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 |
|
|
#6 |
|
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 06: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? |