Processing XML with Perl | Michel Rodriguez |
Tree Processing | XML transformation Modules |
Filtering vs Extracting
Filtering
- Process what you want, output the rest unchanged
- Flexible and easy to maintain when the format of the output changes
- Similar to the Unix filter model
Extracting
- Extract the elements you want to process, do not output the rest
- Better control over the output
- Can be harder to maintain
Which model to choose?
- The decision can be made at each level in the XML tree
- Depends on the rest of the processing
Tree Processing | XML transformation Modules |