I think your xml file should be structured with description, weight, class, rate and charges as children of the typeCharge, like:Then you loop through the typCharge items and check to see if its the one you want. Once you have it you get its children and find the charges one.Code:<typeCharge name="FS"> <description>LTL FUEL SURCHARGE OF 28.50%</description> <weight /> <class /> <rate /> <charges>45.67</charges> </typeCharge>
Or, you could have it like below and replace ITEM with something else:Both these ways the items are grouped in a way that they relate to each other.Code:<ITEM> <typeCharge>FS</typeCharge> <description>LTL FUEL SURCHARGE OF 28.50%</description> <weight /> <class /> <rate /> <charges>45.67</charges> </ITEM>




Reply With Quote