I have an array populated from a parsed XML file. The XML
file has a node representing an employee with attributes for "id",
"tenure" , "phone" and "address". I want to be able to change the
"id" attribute for a particular employee dynamically. Do I work
with the array or is it better to affect the attribute in the xml
doc , in which case I am clueless there as well so any help will be
Maybe this will help with some ideas. If you're intending to
return the changed XML to a server then I'd suggest trying to work
with the XML if you can.
Just be aware that whenever you use arrays (either from
childNodes property or from XPathAPI.selectNodeList method) you can
work within the node (via reference) through array iteration, but
you need to use the XMLNode methods to remove or add nodes, or
(using insertBefore) change the sequence.