Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 928217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:58:31+00:00 2026-05-15T19:58:31+00:00

I am writing a code generation tool that will take in a XSD file

  • 0

I am writing a code generation tool that will take in a XSD file generated from Visual Studio’s Data Set Generator and create a custom class for each column in each table. I already understand how to implement a IVsSingleFileGenerator to do the code generation and how to turn that single file generator in to a multi-file generator. However it seems the step I am having the most trouble with is the one that should be the most simple. I have never really worked with XML or XML-Schema before and I have no clue what is the correct way to iterate through a XSD file and read out the column names and types so I can build my code.

Any recommendation on a tutorial on how to read a XSD file? Also any recommendations on how to pull each xs:element that represents a column out and read its msprop:Generator_UserColumnName, type, and msprop:Generator_ColumnPropNameInTable properties from each element.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:58:31+00:00Added an answer on May 15, 2026 at 7:58 pm

    As btlog says, XSDs should be parsed as XML files. C# does provide functionality for this.

    XPath Tutorial: http://www.w3schools.com/xpath/default.asp

    XQuery Tutorial: http://www.w3schools.com/xquery/default.asp

    Random C# XmlDocument tutorial: http://www.codeproject.com/KB/cpp/myXPath.aspx

    In C#, XPath/XQuery are used via XmlDocument . In particular, through calls like SelectSingleNode and SelectNodes.

    I recommend XmlDocument over XmlTextReader if your goal is to pull out specific chunks of data. If you prefer to read it line by line, XmlTextReader is more appropriate.

    Update: For those interested in using Linq to query XML, .Net 4.0 introduced XDocument as an alternative to XmlDocument. See discussion at XDocument or XmlDocument.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a code generation tool that frequently will have lines like StringBuilder
i am writing some code in vb.net that will be generating a pdf file.
I'm writing a tool that will generate HTML based on JSON data, and puts
I am writing some code generation templates that will work hand-in-hand with a SubSonic
I'm writing a simple code generation application to build POCO's from a DB2 database
While writing code in a file that would comprise of PHP, HTML, CSS &
I'm writing a small tool for generating php checks from javascript code, and I
I am writing code to clone object but have no cue from Hobo documentation.
I am writing code for a database to fetch data in an activity which
I'm playing around with OpenGL and I'm finding myself writing code that I feel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.