Ok, so I basically need to declare variables and assign them with data from an XML file. And I cannot seem to figure it out or find it anywhere.

What the end goal is, is to be able to compare two sets of data, and display the one result that matches both of them. So here is some sample code, whose syntax is completely wrong and just here for an example.

if ((variable1 == variable1FromXMLFile) && (variable2 == variable2FromXMLFile))
        // output the resulting unit from the xml file
        // havent worked out all the details  here yet
;

The problem is that I cant seem to take the value of an attribute of a unit from the XML file that I am working with, and make it into a variable. Any ideas on how to accomplish this?

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.