473,666 Members | 2,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not getting attribute into dataset using XSD

Here's my XML
<?xml version="1.0" encoding="UTF-8"?>
<results>
<status code="ok"/>
<report-bulk-users>
<row principal-id="23859115" type="user">
<login>mu***@do main.com</login>
<name>My User</name>
<email>my****@d omain.com</email>
<manager>ma**** *@domain.com</manager>
</row>
</report-bulk-users>
</results>

Here's the VS2005 generated XSD

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDe fault="unqualif ied" elementFormDefa ult="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="results">
<xs:complexType >
<xs:sequence>
<xs:element name="status">
<xs:complexType >
<xs:attribute name="code" type="xs:string " use="required" />
</xs:complexType>
</xs:element>
<xs:element name="report-bulk-users">
<xs:complexType >
<xs:sequence>
<xs:element maxOccurs="unbo unded" name="row">
<xs:complexType >
<xs:sequence>
<xs:element name="login" type="xs:string " />
<xs:element name="name" type="xs:string " />
<xs:element name="email" type="xs:string " />
<xs:element minOccurs="0" name="manager"
type="xs:string " />
</xs:sequence>
<xs:attribute name="principal-id" type="xs:unsign edInt"/>
<xs:attribute name="type" type="xs:string " use="required"
/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

I then use xsd
xsd.exe /d /l:CS users.xsd

When I try and read the XML into the typed dataset using ReadXML, I'm
getting all the data except the attribute principal-id. I've tried manually
changing it to type="xs:string " and rebuilding the class file with xsd but
no help. Any ideas why?

Thanks
Oct 17 '07 #1
1 2612
Please ignore this post. I'm connecting to Adobe Connect web service. I
had an extra parameter in my test file and They Changed The Attribute Name
from principal-id to principal_id.

Why they do that? Who knows.
Oct 18 '07 #2

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

Similar topics

2
2968
by: Isz | last post by:
Hi Group: I would like to know if it is possible to change the name of an attribute to something else. My setup is like this: I have serveral SQL tables that I nest and join so that it all outputs into a nice XML file for the purpose of populating a flash navigation menu. <NewDataSet> <mainMenu_category menu_name="Home" menu_ID="1"> <menu menu_ID="1" />
2
6698
by: Ian Griffiths | last post by:
I have been given a schema, instances of which I'm required to be able to consume and generate. I'd like to be able to manipulate these instances as DataSets internally in my application. The schema defines the following simpleType: <xs:simpleType name="cs"> <xs:restriction base="xs:token"> <xs:pattern value="*"/> </xs:restriction> </xs:simpleType>
10
2376
by: Eric J. Smith | last post by:
I am attempting to add an Editor attribute to an IListSource derived class (specifically it's a typed DataSet). It appears that IListSource over rules any Editor attribute. Is there any way that I can get my Editor attribute to be used? Any help is greatly appreciated! Eric J. Smith
11
4228
by: Vinod I | last post by:
Hi Team, I am having a string as "System.Data.SqlDbType.Int". Now I want to convert this string type to actual type to use with my Command object Parameter Creation. How I will convert this string to the type object ?. Thanks in advance
1
3889
by: Oleg Shnayderman | last post by:
Hi All, I am very new to C# as well as to SQL. I need to write an application which is connecting to SQL DB and getting all the user's tables and after create a dataset for all the tables in the database and create an XML document with all the info. The problem is, that I can do this if I know the table name. However, what if I don't know the table name nor I know how many user's tables in the particular database.
6
3184
by: Erik H. | last post by:
Trying to connect to MySQL db on localhost, and populate datagrid from a dataset using code inline method. Getting the following compile error: Error Message: "CS0246: The type or namespace name 'CoreLab' could not be found (are you missing a using directive or an assembly reference?)" I downloaded the add on for connecting to MySQL using ADO.NET and installed it, but am still getting this error. Anybody ever run into this before?
1
1408
by: Nathan Sokalski | last post by:
I have retrieved data from a database using a SELECT statement that includes an INNER JOIN. The data seems to be retrieved to the DataSet OK, but I am having trouble getting the data from the DataSet. The code I am using is as follows: Private Sub btnDownloadDB_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnDownloadDB.Click Dim papdatabase As New DataSet Dim cmdSelect As New...
1
2176
by: hzgt9b | last post by:
(FYI, using VB .NET 2003) Can someone help me with this... I'm trying to read in an XML file... it appears to work in that the DataSet ReadXML method dose not fail and then I am able to access the table names that are in the XML file, but I'm not able to access the rows. Here's the code that I've got - it assumes that the fileName passed in already exists: Public Sub GetInput(ByVal fileName As String) dsFileCopy = New...
1
1602
by: Jimmy | last post by:
I have two questions regarding using filters. One: I would like to be able to filter the records, displayed in a form based on several criteria using checkboxes or option buttons. The table has a number of Yes/No fields that are used to describe an item. These include things such as BlueColor, RedColor, etc. On the form I want to have a seperate button for each attribute. As the user selects one of the buttons I want to filter the list...
0
8449
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8360
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8876
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8556
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8642
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1777
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.