0
我解析我的XML使用功能解析文檔對象獲得的Xml文件
public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException, InstantiationException, IllegalAccessException, ClassNotFoundException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyException, MarshalException, XMLSignatureException, TransformerException
{
File fXmlFile = new File("C:\\Users\\admin\\Desktop\\Esign.xml");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
test t=new test();
Document d=t.sign(doc);
}
,但我需要的輸出((文件d))轉換回XML文件。 我該怎麼做?
標準方法是使用XSLT轉換和[Identity Transform](https://en.wikipedia.org/wiki/Identity_transform) –