Help with parsing XML file (substitutions)
Hello,
I am attempting to parse an XML file using XSLT, and bought the XSLT 2.0 3rd Edition book to help me with this, but so far, I am stuck...
The XML file lists a series of parts, which are parsed during a process. Some parts will refer to a more generic part number (even though a part has a different part number, it could be the exact same part), and I would like to output the generic part instead.
There are actually more than one XML file involved with this, but this is the part I am stuck on right now.
So, example XML:
<parts>
<part partNumber="12345678" name="Widget 1" />
<part partNumber="12312312" name="Widget 2" />
<part partNumber="ABC123" />
<part partNumber="ABC123" name="Super Widget" />
</parts>
What I would like for output is:
<parts>
<part partNumber="12345678" name="Widget 1" />
<part partNumber="ABC123" name="Super Widget" />
</parts>
Anyone have suggestions on how I should approach this?
|