Xtool/XmlnsPrefix

From tehowiki
Jump to navigation Jump to search

XmlnsPrefix - Rewrite XML Namespace Prefixes in an XML file

Sometimes it is necessary to change the namespace prefixes in an XML document, to remove one (thus making it the default) or to change the default to an explicit prefix. The latter operation is rather tedious when done manually. With XmlnsPrefix one or more mappings from one prefix to another can be specified. The XML file to be modified must be uploaded to the web server, and the resulting, modified XML file is shown in the browser.

Options:

  • -e enc source file encoding, default: UTF-8
  • -p old1:new1 change prefix "old1" to prefix "new1" (both may be empty)
  • -p old2:new2 ...
  • ...