Jump to content

load XML file, find() method


Recommended Posts

Hello, I'm a new in Javascript and I don't understand why in de code snippet below

1) serial = $(this).find('SERIALNUMBER').text().toUpperCase(); 

retruns the actual serianumber from the loaded XML file and why

2) a = $(this).find(param5).text().toUpperCase();

doesn't, knowing that param5 is equal to 'SERIALNUMBER'

Thanks for clearing my mind


code snippet


        type: "GET",
        url: param3,
        dataType: "xml",
        success: function(xml) {
                var searchString="";
                var a = [];
                for (i = 0; i < param6; i++) {
                    a = $(this).find(param5).text().toUpperCase();
                    serial = $(this).find('SERIALNUMBER').text().toUpperCase()

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...