java inside is xmlutils
Only getDocumentBuilder methods
no printDOMTree
Here is the code
String url = "http://ip/service/XChangeServlet?account=01&receiver=01";
HttpURLConnection connection = PostFile.getConnection (url, false);
connection.setDoOutput (true);
connection.setRequestProperty ("Contect-type", "text / xml");
connection.setRequestMethod ("POST");
File file = new File ("d: \ \ store \ \ receivable single 11.xml");
InputStream input = new FileInputStream (file);
org.w3c.dom.Document doc = XMLUtil.getDocumentBuilder () parse (input).;
Writer writer = new OutputStreamWriter (connection.getOutputStream (), encoding);
XMLUtil.printDOMTree (writer, doc, 1, encoding); / / output format according to an XML file
writer.flush ();
writer.close ();
InputStream inputStream = connection.getInputStream ();
String back = toString (inputStream);
System.out.println (back);
------ Solution ------------------------- -------------------
you want to express what the problem is ?
------ For reference only -------------------------------------- -
would like to ask this XMLUtil class where ah
------ For reference only ------------------------- --------------
use this class file does not import this class do
------ For reference only --------- ------------------------------
no . . . Found. Internet can not find
------ For reference only --------------------------------- ------
suspect class of this project is to help provide their own search in the same project can not find ?
------ For reference only -------------------------------------- -
wanted this XMLUtil provided in the same class blog , the purpose is to make business processes more convenient to use
http://blog.csdn.net/tiandiqing/article/details/4392824
------ For reference only ----------------- ----------------------
XMLUtil class did not solve the problem ?
没有评论:
发表评论