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

Home Posts Topics Members FAQ

UnhandledAttrib utes property of XmlSchemaElemen t

Hi Folks,

I'm reading a schema using SOM (System.Xml.Sch ema) and there are namespaced
attributes that I need to access but I'm having problems with the
UnhandledAttrib utes property - that is is continually reports an error:

Object reference not set to an instance of an object.

My code looks like this:

....

foreach (XmlSchemaObjec t so in schema.Items)
{
switch(so.GetTy pe().Name)
{
case "XmlSchemaEleme nt":
XmlSchemaElemen t el = so as XmlSchemaElemen t;
XmlAttribute[] uAtts = el.UnhandledAtt ributes;
foreach (XmlAttribute uAt in uAtts)
{
Response.Write( uAt.Name + ":" + uAt.Value);
}
break;
}
}
...

The error specifies the line containing the inner foreach loop... Any ideas?

Rein
Nov 11 '05 #1
0 1258

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

Similar topics

1
1387
by: Rein Petersen | last post by:
Somebody please tell me what is the matter with the System.Xml.Schema.XmlSchemaElement.UnhandledAttributes property. I don't seem to be able to access no matter how I try... Rein
1
3347
by: Sam Vanhoutte | last post by:
Hello, I am generating an XML schema for the use in Biztalk 2004. Everything works, except for one simple thing. I cannot add XmlSchemaElements to a XmlSchemaComplexType. This is necessary for the use of subrecords (nested elements, like the SubRecord1 element in the example below). I can add attributes to the complextype, but I don't...
1
1729
by: Josh | last post by:
Is there anyway to get the correct XmlSchemaElement from an XSD that corresponds to an element within an Xml Document Instance? I want to automatically generate a UI for an Xml Instance based upon information contained within an XSD. Based on the selected element within the Xml Instance document I want to find the corresponding...
3
2475
by: Johnny M | last post by:
using Access 2003 Pardon the subject line, but I don't have a better word for this strange behavior (or behavior I don't understand!!!) I have a class module named DepreciationFactor. One of the properties is a follows (irrelevant code omitted):
2
1752
by: Edward Diener | last post by:
How does one specify in a component that a property is a pointer to another component ? How is this different from a property that is actually an embedded component ? Finally how is one notified in a component when another component is destroyed ? I have a managed component called P. Let us say that C is another managed component. If on P I...
0
5552
by: Brian Young | last post by:
Hi all. I'm using the Property Grid control in a control to manage a windows service we have developed here. The windows service runs a set of other jobs that need to be managed. The control is used to view the state of the running jobs and schedule new jobs. The control also runs in the context of Internet Explorer (we do this so the...
3
6733
by: Marty McFly | last post by:
Hello, I have a control class that inherits from System.Web.UI.WebControls.Button. When I drag this control from the "My User Controls" tab in the toolbox onto the form, I want it to reflect the following default properties: Height = 32px, Width = 144px. I declare the Width property in my control as... \\\
15
1886
by: Sam Kong | last post by:
Hello! I got recently intrigued with JavaScript's prototype-based object-orientation. However, I still don't understand the mechanism clearly. What's the difference between the following two? (1)
1
2971
by: =?Utf-8?B?THVjIEFscXVpZXI=?= | last post by:
Context : .Net Framwork 2.0, C#, XPSP2,VStudio 2005 hi, Is this behavior is by design or is it a bug ? I've found any documentation that mention that fact. It works fine for the following schema objects, i've tested : - XmlSchemaElement - XmlSchemaAttribute - XmlSchemaEnumerationFacet
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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. ...
1
7676
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
6284
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...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
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.