We help IT Professionals succeed at work.
Get Started

jQuery - how to parse XML retreived from AJAX request

josephdaviskcrm
on
901 Views
Last Modified: 2012-06-22
I've got the following jQuery code that performs an AJAX request...

    $.ajax({
        url: "Services/PageMetaData.aspx?id=" + this.windowID,
        dataType: "xml",
        success: function (data) {
           
        }
    });

I have already verified that the AJAX request is successfully returning the following XML...

<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<!--Created at: 2010-06-19 05:56:44-->
<pageMetaData>
    <pageID>1</pageID>
    <pageUrl>Pages/TestPage.aspx</pageUrl>
    <pageTitle>Testing Page</pageTitle>
    <imageUrl>Images/Stock/testingIcon.png</imageUrl>
    <defaultWidth>400</defaultWidth>
    <defaultHeight>350</defaultHeight>
</pageMetaData>

My question is, how do I use jQuery to parse the data out of the XML?
Comment
Watch Question
CERTIFIED EXPERT
Expert of the Year 2008
Top Expert 2008
Commented:
This problem has been solved!
Unlock 1 Answer and 16 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE