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

  • SEARCH
  • Home
  • 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 6818051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:07:45+00:00 2026-05-26T21:07:45+00:00

My Goal: I would like to search for elements in large XML Schema spec.

  • 0

My Goal:
I would like to search for elements in large XML Schema spec. compound from multiple XSD files (with use of import).

Is is possible to use the LINQ? How can I store whole SOM (schema object model) into memory and then ask?

I tried:

Dim reader As XmlTextReader = New XmlTextReader(path)
Dim myschema As XmlSchema = XmlSchema.Read(reader, AddressOf ValidationCallback)

But I have no idea how to use the LINQ here.

  • 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-26T21:07:45+00:00Added an answer on May 26, 2026 at 9:07 pm

    The best way to manage multiple schemas is to use an XmlSchemaSet; add your schema(s) to an XmlSchemaSet and then compile it. This should answer your “SOM into memory”.

    For how to use LINQ against a compiled XmlSchemaSet, it very much depends on the type of problem you’re trying to solve. For example, let’s say you’re trying to get all the elements in an XML namespace. You might write something like this (I realize I’ve phrased it in C#, I hope you’re ok with it).

    XmlSchemaSet xset = new XmlSchemaSet();
    xset.Add(XmlSchema.Read(...);
    xset.Compile();
    var query = from XmlSchemaElement element in xset.GlobalElements.Values where element.QualifiedName.Namespace == "urn:tempuri-org:mine" select element;            
    foreach(XmlSchemaElement element in query) DoSomething();
    

    Another example might be use the Distinct clause to collect the set of XML namespaces that make up your set.

    List<string> query1 = (from XmlSchema schema in xset.Schemas() select schema.TargetNamespace).ToList();
    IEnumerable<string> xmlns = query1.Distinct();
    

    I hope these give you an idea…

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

Sidebar

Related Questions

My Goal I would like to have a main processing thread (non GUI), and
I would like to have a Maven goal trigger the execution of a java
I would like to rewrite the collection that is returned by Mage::getResourceModel('sales/order_collection'); My goal
I'd like to be able to use php search an array (or better yet,
I would like to better understand how the various common search algorithms relate to
How can you automatically import the latest build/revision number in subversion? The goal would
Goal Java client for Yahoo's HotJobs Resumé Search REST API . Background I'm used
Goal: Create Photomosaics programmatically using .NET and C#. Main reason I'd like to do
My goal is to maintain a web file server separately from my main ASP.NET
I would like to mark an arbitrary group of commits/changesets with a label. Commit

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.