473,569 Members | 2,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
XmlValidatingRe ader to see if that made any difference but it did not. Any
suggestions? Thanks

Chris
Aug 8 '06 #1
1 1382


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
XmlValidatingRe ader to see if that made any difference but it did not. Any
suggestions? Thanks
XmlType sounds like you are using .NET 2.0, XmlValidatingRe ader not.

If you are using .NET 2.0 then make sure that processing inline schemas
is enabled when you load the document e.g.
XmlReaderSettin gs readerSettings = new XmlReaderSettin gs();
readerSettings. ValidationFlags |=
XmlSchemaValida tionFlags.Proce ssInlineSchema;
readerSettings. ValidationType = ValidationType. Schema;

XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Loa d(XmlReader.Cre ate(@"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
3065
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 explain to me how I create a list and traverse it? In particular, how do I make use of the node.h method GetNext()? I don;t know what to do with it.
3
3468
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
1816
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
2773
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 would like the names of the elements to be different from the class name as generated by xsd.exe. I don't want to change the class name itself,...
0
2404
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. -- Daniel
9
18672
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
4533
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. I can iterate the document and get my XmlType and XmlBaseType values just fine. However, as soon as I call SetValue to write to an attribute, the
2
1366
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
2634
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 specific information in the xmltype datatype. SELECT a.col1.extract('//TABLE_NAME').getStringVal() as hello FROM tab1 a And I would like to ask...
4
2351
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 question is pretty straightforward and my brain hasn't been working. Problem: The way I'm iterating through the nodes doesn't allow me to preserve the...
0
7921
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.