473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to get XmlType of a node from in-line schema

I load an XmlDocument which has an inline schema. I want to use XmlType
property of XPathNavigator to get the type according to this inline schema.
But XmlType is null for all nodes. I tried loading the documenting from an
XmlValidatingReader to see if that made any difference but it did not. Any
suggestions? Thanks

Chris
Aug 8 '06 #1
1 1370


ChrisHarrington wrote:
I load an XmlDocument which has an inline schema. I want to use XmlType
property of XPathNavigator to get the type according to this inline schema.
But XmlType is null for all nodes. I tried loading the documenting from an
XmlValidatingReader to see if that made any difference but it did not. Any
suggestions? Thanks
XmlType sounds like you are using .NET 2.0, XmlValidatingReader not.

If you are using .NET 2.0 then make sure that processing inline schemas
is enabled when you load the document e.g.
XmlReaderSettings readerSettings = new XmlReaderSettings();
readerSettings.ValidationFlags |=
XmlSchemaValidationFlags.ProcessInlineSchema;
readerSettings.ValidationType = ValidationType.Schema;

XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(XmlReader.Create(@"file.xml", readerSettings));

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Aug 8 '06 #2

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

Similar topics

8
by: J Peterman | last post by:
Im having a nightmare trying to understand these nodes and linked lists. I've posted my code for my node.h, node.cpp, linkedlist.h and linkedlist.cpp files in separates replies. Can someone...
3
by: ricky | last post by:
I want to return with only one xpath expression the first following node relative to a node with a XPTO attribute. Example: <node> xxx </node> <node XPTO="true"> yyy
2
by: Abhinav | last post by:
Hi .. I have the following sort of xml (In an xmlType in the database ..) <or_group> <operand>a</operand> <operand> <and_group> <operand>b</operand>
4
by: Bradley Plett | last post by:
I have a relatively simple xsd which I am turning into a class using "xsd.exe". I then create a collection of these classes. I have run into one minor problem. When serializing my collection, I...
0
by: Daniel Lidström | last post by:
Hi, for what reason do I put XmlType and XmlRoot attributes on classes for XML serialization? I understand the reason for the top element, but not why it is sometimes put for child elements. ...
9
by: Moses | last post by:
Hi All, How to check weather a node has sibling? Is there any function like " hasChildNodes() " Thanks in Advance Moses
2
by: =?Utf-8?B?Tm9yZW1hYw==?= | last post by:
Hi. Using VS2005, .NET 2.0. I have an xml document that I want to go through and set the values on attributes of elements. The elements are complex types defined in my schema (xsd) files. ...
2
by: stepby | last post by:
Hi All, In the Oracle, there is a datatype called XMLTYPE. I would like to ask is it possible to get back the xml database by ASP ? What kinds of object can be used ? Thanks stepby
0
by: stepby | last post by:
Hi All, I am using the ASP as the server side language. I would like to ask how to retrieve the whole xml form the xmltype datatype in the database. I have found some SQL example to retrieve...
4
by: matth | last post by:
I've been working on something that deals with handling a user's selection within the DOM and I'm tripping up on one last, but crucial, detail. Forgive me for the length of the code, but my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.