A software application I use produces XML documents with inaccurate
information. I need to change a few values within the document and output
the whole corrected document as XML.
Two kinds of changes are necessary, both in nearly the same place in the
document structure:
1. For each /AttributeProps/Datatype element with a value of DATE, I need to
change DATE to TIMESTAMP.
2. For each /AttributeProps/Order element, I need to take whatever the
value of Order is and then use that value to replace the value of
/AttributeProps/PhysicalOrder.
So if Order has the value 1, PhysicalOrder must have the value 1 also. (This
may already be true in many cases, but I imagine there's no sense in testing
that they're equivalent. I would be just as easy to overwrite the value of
PhysicalOrder every time, wouldn't it?)
So, basically, I need to change two types of things and then copy over the
entire XML document with the changes in it. This would seem very simple, but
I'm at a loss.
Walter Crockett