我想用
Java创建XML.
DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder; docBuilder = dbfac.newDocumentBuilder(); Document doc = docBuilder.newDocument();
但是Java会自动创建这样的声明
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
如何删除encoding =“UTF-8”standalone =“no”,这样就可以了
<?xml version="1.0"?>
谢谢!