[Melbourne-pm] XML Namespace

Joshua Goodall joshua at roughtrade.net
Mon Oct 4 21:02:11 CDT 2004


On Tue, Oct 05, 2004 at 11:50:32AM +1000, Scott Penrose wrote:
> So - one suggestion has been to use regular expressions - this 
> technically works (remove all namespace and add your own) but it is not 
> ideal, and does not pick up the validation part.

If you use the SAX API (I recall we discussed this previously) you
could just write a SAX Filter class (derived from XML::SAX::Base)
that modifies the XML event stream as it passes through the filter
and munges the namespace attribute.

Since SAX's XML events are already parsed, there's no representation issues
and you can use string comparison and assignment rather than regexes.

J


-- 
Joshua Goodall                           "as modern as tomorrow afternoon"
joshua at roughtrade.net                                       - FW109


More information about the Melbourne-pm mailing list