Locating XML node by child node value inside of it, and changing another value

Adam30

New Member
Three part question.Is it possible to locate a specific XML node by a child inside of it to retrieve other children of the parent? Example:\[code\]<House> <Kitchen> <Appliance> <Name>Refrigerator</Name> <Brand>Maytag</Brand> <Model>F2039-39</Model> </Appliance> <Appliance> <Name>Toaster</Name> <Brand>Black and Decker</Brand> <Model>B8d-k30</Model> </Appliance> </Kitchen></House>\[/code\]So for this, I would like to locate the appropriate Appliance node by searching for "Refrigerator" or "Toaster", and retrieve the brand from it.The second part of this question is this: Is this a stupid way to do it? Would using an attribute in the Appliance tag make this a lot easier? If so, how would I locate it that way?As for the third part, once I locate the Appliance, how would I go about changing say, the Model, of that particular appliance?
 
Back
Top