Translate

Image of Beginning Google Maps API 3
Image of Android Wireless Application Development
Image of Operating System Concepts
Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)

Remove Namespaces from XML Documents

A frequent requirement when transforming XML documents is to remove some or all of a document namespaces. XML namespaces provide a simple and straightforward way to distinguish element and attribute names used in XML documents by associating them with namespaces identified by URI references. Consider the following example XML document: <work-order-list> <wo:job xmlns:wo="http:hello" freshness:timestamp="2006-01-12" xmlns:freshness="http://freshness" history:timestamp="2006" xmlns:history="http:history" xmlns:mnr="http:mnr"> <wo:work-order id="1" status="k" freshness:timestamp="2006-01-13" /> </wo:job> <wo:job xmlns:wo="http:hello" freshness:timestamp="2006-01-13" xmlns:freshness="http://freshness" history:timestamp="2006" xmlns:history="http:history" xmlns:mnr="http:mnr"> <wo:work-order id="2" status="k" freshness:timestamp="2006-01-14" /> </wo:job> <wo:job xmlns:wo="http:hello" freshness:timestamp="2006-01-14" xmlns:freshness="http://freshness" history:timestamp="2006" xmlns:history="http:history" xmlns:mnr="http:mnr"> <wo:work-order id="3" status="k" freshness:timestamp="2006-01-15" /> </wo:job> </work-order-list> It has several namespaces in it including wo, freshness,