webmasterbeta
New Member
I've tried to read up on this but I just don't get it... How does one go about modifying an XML document's values?
Here's an example of an XML document I have:
<?xml version="1.0" standalone="yes"?>
<log>
<message>
<timestamp>2007-03-07 09:07:47 PM</timestamp>
<type>FYI</type>
<location>my desk</location>
<status>New</status>
<comment>test 2</comment>
</message>
<message>
<timestamp>2007-02-14 07:54:48 AM</timestamp>
<type>Issue</type>
<location>your desk</location>
<status>Resolved</status>
<comment>test 1</comment>
</message>
</log>
Here is a basic pseudo code description of what I would like to do (in a strict ASP/wintel environment):
for-each //message {
if ./status == æ˜ew?and ./timestamp <= (current-dateTime() - 2 days) {
set ./status = æÂÂœesolved?
}
}
My problems are as follows:
Should I use DOM or XLST to make these changes/
Can XLST write changes to the XML file?
If DOM is the way to go how can I restrict the update to only nodes matching the conditions?
Any assistance would be greatly appreciated. For some reason I'm just not groking this.
Here's an example of an XML document I have:
<?xml version="1.0" standalone="yes"?>
<log>
<message>
<timestamp>2007-03-07 09:07:47 PM</timestamp>
<type>FYI</type>
<location>my desk</location>
<status>New</status>
<comment>test 2</comment>
</message>
<message>
<timestamp>2007-02-14 07:54:48 AM</timestamp>
<type>Issue</type>
<location>your desk</location>
<status>Resolved</status>
<comment>test 1</comment>
</message>
</log>
Here is a basic pseudo code description of what I would like to do (in a strict ASP/wintel environment):
for-each //message {
if ./status == æ˜ew?and ./timestamp <= (current-dateTime() - 2 days) {
set ./status = æÂÂœesolved?
}
}
My problems are as follows:
Should I use DOM or XLST to make these changes/
Can XLST write changes to the XML file?
If DOM is the way to go how can I restrict the update to only nodes matching the conditions?
Any assistance would be greatly appreciated. For some reason I'm just not groking this.