XML fix namespace declaration
问题 I am trying to detetct/work around this bug in RSS elements. That means I have to find a wrong namespace-declaration and change its value to the correct namespace. E.g: xmlns:media="http://search.yahoo.com/mrss" must be: xmlns:media="http://search.yahoo.com/mrss/" How can I achive that given a org.w3c.Document? I meanwile found out how to get all elements of a certain namespace: XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); XPathExpression expr = xpath.compile("