Generating classes from an .xsd file

B

Burak

Hello,

I am working on a VB.NET web service that will be used to send and
receive job openings.

I found a site called "hr-xml consortium"

"The HR-XML Consortium is an independent, non-profit organization
dedicated to the development and promotion of a standard suite of XML
specifications to enable e-business and the automation of human
resources-related data exchanges."

I would like to use their xsd file

http://ns.hr-xml.org/2_2/HR-XML-2_2/SEP/PositionOpening.xsd

which specifies the formatting for job openings. This xsd file makes
use of other xsd files on the site.

How can I generate classes from this xsd file in vb.net? Once they
are generated, I would then fill them with data and then send them to
the client.

Thank you,

Burak
 
A

ashelley

Hello,

I am working on a VB.NET web service that will be used to send and
receive job openings.

I found a site called "hr-xml consortium"

"The HR-XML Consortium is an independent, non-profit organization
dedicated to the development and promotion of a standard suite of XML
specifications to enable e-business and the automation of human
resources-related data exchanges."

I would like to use their xsd file

http://ns.hr-xml.org/2_2/HR-XML-2_2/SEP/PositionOpening.xsd

which specifies the formatting for job openings. This xsd file makes
use of other xsd files on the site.

How can I generate classes from this xsd file in vb.net? Once they
are generated, I would then fill them with data and then send them to
the client.

Thank you,

Burak

hello

in vs 2003

try adding the xsd object to your project.
right click in the xsd designer and select "generate dataset"

once you have generated the dataset you will have these classes
available to your program.

research the XmlDataDocument.

-Adam
 
B

Burak Gunay

Hello Adam,

I did what you wrote and it came back with ther following error

"DataSet doesn't support 'union' or 'list' as simpleType."

Do you know how to fix this?

Thanks,

Burak

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
A

ashelley

Hello Adam,

I did what you wrote and it came back with ther following error

"DataSet doesn't support 'union' or 'list' as simpleType."

modify the xsd file so that it is supported by the dataset. Other
than that, i'm not sure. We need to call in an expert for that one.

-Adam
 
J

JH

I have (about 8 months ago) talked with Paul Kiel (HR-XML) regarding
converting HR-XML XSDs to CSharp classes (using the xsd utility provided in
my other response to this thread). At the time I was the first to do this
with the Resume2 xsd of theirs. He may have followed the instructions I
provided back then to do the same for some of the other XSDs they have (I
only needed the resume class so I didn't bother with any of the other ones).
You may wish to inquire to find out. If he has, I am certain he'd gladly
pass the information along.

HTH,
JH
 
B

Burak Gunay

Hello,

I cleaned up the xsd file and ran xsd.exe on it and it produced the
class file.

Paul Kiel suggested that I use "XSDObjectGen" by microsoft instead of
xsd.exe.

Thanks,

Burak


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
B

Burak Gunay

Hello JH,

I ran XSDObjectGen on the PositionOpening.xsd and
it performed better than xsd.exe but still there are some classes
missing and conflicts between classes and enums.

The code won't compile. :(

Is there a complete vb.net class library version of PositionOpening that
compiles without any problems?

Thank you,

Burak


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
B

Burak

Hi Jason,

JH said:
I have (about 8 months ago) talked with Paul Kiel (HR-XML) regarding
converting HR-XML XSDs to CSharp classes (using the xsd utility provided in
my other response to this thread). At the time I was the first to do this
with the Resume2 xsd of theirs. He may have followed the instructions I
provided back then to do the same for some of the other XSDs they have (I
only needed the resume class so I didn't bother with any of the other ones).

Were you able to convert the resume xsd to vb.net classes? It was
giving me problems so I jettisoned some classes ( a trick that worked
for job posting xsd ).

It compiled fine but when I tried to call it from the server it always
came up with weird dll errors.

Do you have a clean vb.net class version of the hr-xml resume xsd, one
without any glitches?

Thank you,

Burak
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top