Parsing secure entries XML file with jquery

Posted by user573131 on Stack Overflow See other posts from Stack Overflow or by user573131
Published on 2011-01-12T17:49:26Z Indexed on 2011/01/12 17:54 UTC
Read the original article Hit count: 279

Filed under:
|
|

Apologies if this is elementary. I'm primarily a front end designer/dev.

I have webform through a form service called wufoo.

Wufoo generates a lovely XML (or json) file that can be grabed and parsed.

I'm trying to grab the entries xml feed that is associated with the form and parse it via jquery to show who has entered.

Im using the following code (which works with a local xml file).

http://bostonwebsitemakeover.com/2/test

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script> 
<script> 
$(document).ready(function () {
    $.ajax({
        type: "GET",
        url: "people.xml",
        dataType: "xml",
        success: xmlParser
    });
});




function xmlParser(xml) {

    $('#load').fadeOut();

    $(xml).find("Entry").each(function () {

        $(".main").append('<div class="entry">' + $(this).find("Field1").text() + ' ' + $(this).find("Field2").text() + ' http://twitter.com/' + $(this).find("Field17").text() + '</div>');
        $(".entry").fadeIn(1000);

    });



}
</script> 

My XML file contains the following:

<?xml version="1.0"?>
<Entries>
    <Entry>
        <EntryId>1</EntryId>
        <Field1>Meaghan</Field1>
        <Field2>Severson</Field2>
        <Field17/>
    </Entry>
    <Entry>
        <EntryId>2</EntryId>
        <Field1>Michael</Field1>
        <Field2>Flint</Field2>
        <Field17>michaelflint</Field17>
    </Entry>
    <Entry>
        <EntryId>3</EntryId>
        <Field1>Niki</Field1>
        <Field2>Brown</Field2>
        <Field17>nikibrown</Field17>
    </Entry>
    <Entry>
        <EntryId>4</EntryId>
        <Field1>Niki</Field1>
        <Field2>Brown</Field2>
        <Field17>nikibrown</Field17>
    </Entry>
</Entries>

I'm wondering how I would do this with the xml file hosted on the wufoo (which is https)

So I guess Im asking how do I authenticate the feed via jquery? Or do i need to do this via json? Could someone explain how?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about Xml