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 8053653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:55:20+00:00 2026-06-05T07:55:20+00:00

I am attempting to get a set of elements from an XSD document. I

  • 0

I am attempting to get a set of elements from an XSD document. I have downloaded and I am using the latest version of jQuery (1.7.2). The xsd referenced is a local copy of http://www.w3.org/2001/XMLSchema.xsd the code I am using is as follows:

var xml;
$(function(){
    $.ajax({
        type:"GET",
        url:"http://www.w3.org/2001/XMLSchema.xsd",//"xml/XMLSchema.xsd",
        dataType: 'xml',
        success:function(result){
            xml = $(result);
        }
    });
});

This enables me to load the xsd into the “xml” variable as expected however when I go to query it I end up with some confusing results. Using:

$('complexType[name=simpleType]', xml).attr("name")
$('complexType[name="simpleType"]', xml).attr("name")

return “undefined” however the starts with, ends with and start and ends with return the correct result:

$('complexType[name^="simpleType"]', xml).attr("name")
$('complexType[name$="simpleType"]', xml).attr("name")
$('complexType[name$="simpleType"][name^="simpleType"]', xml).attr("name")

Which is the name “simpleType”. Is there a reason why the =’s does not work?

Thanks in advance

  • 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-06-05T07:55:21+00:00Added an answer on June 5, 2026 at 7:55 am

    I think that you have problem with the usage of namespace. You can try to use

    $('xs\\:complexType[name=simpleType]', xml).attr("name")
    

    (see about escaping of meta-characters here) instead of

    $('complexType[name=simpleType]', xml).attr("name")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im attempting to get a block of text from a file I have already
I'm attempting to get order data from a Yahoo store. I'm using the docs
I am attempting to get a random bearing, from 0 to 359.9. SET bearing
I am attempting to enumerate the set of all pairs made of elements from
I'm attempting to get a set of list items from sharepoint via the WebService.
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
I´ve been attempting to get a polar plotting in a PolarChart using MSchart, and
I am attempting to get rails routes paths via nested resources. I have looked
I have been attempting to get log4net logging in my asp.net web application with
I'm attempting to get my first hello world rails example going using the rails'

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.