473,378 Members | 1,412 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,378 software developers and data experts.

Reading a specific set of elements from xsd

Hi there,

I have an xsd file:

<xsd:element name="RESULTS">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SEARCH_CRITERIA"
type="OutputType:SomeType" minOccurs="0"/>
<xsd:element name="NAMES" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="NAME" minOccurs="0"

maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence>
<xsd:element name="SOME_ID" type="OutputType:SomeType"/>
<xsd:element name="RECORD_CREATE_TMS"
type="OutputType:SomeType"/>
etc...
Under the element "Names" I'd like to iterate thru the sequence to
obtain the element names: "SOME_ID", "RECORD_CREATE_TMS" , etc.

Can someone please tell me how to do this in C#?

Thanks

Sharon

Nov 25 '05 #1
2 913
DC
huh?

what is it that you want to do?
do you want to parse an XSD ?
If so, have you tried the XmlReader?

and...?

help us out here.

-D

<ri*******@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi there,

I have an xsd file:

<xsd:element name="RESULTS">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SEARCH_CRITERIA"
type="OutputType:SomeType" minOccurs="0"/>
<xsd:element name="NAMES" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="NAME" minOccurs="0"

maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence>
<xsd:element name="SOME_ID" type="OutputType:SomeType"/>
<xsd:element name="RECORD_CREATE_TMS"
type="OutputType:SomeType"/>
etc...
Under the element "Names" I'd like to iterate thru the sequence to
obtain the element names: "SOME_ID", "RECORD_CREATE_TMS" , etc.

Can someone please tell me how to do this in C#?

Thanks

Sharon

Dec 1 '05 #2
find the XmlSchemaComplexType object which represents the type of the
element. Under the type there should be a XmlSchemaSequence object which
contains all elements as objects of XmlSchemaElement.

<ri*******@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi there,

I have an xsd file:

<xsd:element name="RESULTS">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SEARCH_CRITERIA"
type="OutputType:SomeType" minOccurs="0"/>
<xsd:element name="NAMES" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="NAME" minOccurs="0"

maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence>
<xsd:element name="SOME_ID" type="OutputType:SomeType"/>
<xsd:element name="RECORD_CREATE_TMS"
type="OutputType:SomeType"/>
etc...
Under the element "Names" I'd like to iterate thru the sequence to
obtain the element names: "SOME_ID", "RECORD_CREATE_TMS" , etc.

Can someone please tell me how to do this in C#?

Thanks

Sharon

Dec 1 '05 #3

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

Similar topics

6
by: Milo Woodward | last post by:
Does anyone know how to retrieve the number of records an XML file contains with a vb.net method? I can read through an entire XML file, import records into SQL Server, etc. However, I don't want...
2
by: Brett Gerhardi | last post by:
Hi all, I'm trying to something that I'm sure must be possible within the schema language but I cannot seem to work it out. Briefly, I am defining a multi-tiered base structure - each tier has...
4
by: Ganesh Muthuvelu | last post by:
Hi STAN, Stan: Thanks for your response to my previous post on reading a XSD file using your article in "https://blogs.msdn.com/stan_kitsis/archive/2005/08/06/448572.aspx". it works quite well...
1
by: j7.henry | last post by:
I am trying to pull specific data that is in a comma delimited file into a web page. So if my comma delimited file looks like: Name,Address,Zip Fred,123 Elm,66666 Mike,23 Jump,11111 I would...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.