public static Source setNameSpaceOnXmlStream ( final InputStream in , final String nameSpace ) throws JDOMException , IOException { final SAXBuilder sb = new SAXBuilder ( new XMLReaderSAX2Factory ( false ) ) ; final Document doc = sb . build ( in ) ; doc . getRootElement ( ) . setNamespace ( Namespace . getNamespace ( nameSpace ) ) ; return new JDOMSource ( doc ) ; }
Sets the name space on xml stream .