Guest User

Untitled

a guest
Jan 22nd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE security [
  3. <!ENTITY attachparam SYSTEM "attach-value.xml">
  4. <!ENTITY udf SYSTEM "udfasset.xml">
  5. ]>
  6. <property>
  7. &attachparam;
  8.  
  9. </property>
  10.  
  11. <value regex=".+">localhost</value>
  12. <value regex="^[A-Z]+">allow</value>
  13.  
  14. <?xml version="1.0" encoding="UTF-8" standalone="no">
  15. <property>
  16. <value regex=".+" xml:base="file:///home/bharathi/attach-value.xml">localhost</value>
  17. <value regex="^[A-Z]+" xml:base="file:///home/bharathi/attach-value.xml">allow</value>
  18. </property>
  19.  
  20. TransformerFactory transformerFactory = TransformerFactory.newInstance();
  21. Transformer transformer = transformerFactory.newTransformer();
  22.  
  23. DOMSource source = new DOMSource(document);
  24.  
  25. String tempFile = "/home/bharathi/out.xml";
  26. LOGGER.log(Level.INFO, "tempFile is :: " + tempFile);
  27.  
  28. StreamResult result = new StreamResult(new File(tempFile));
  29.  
  30. transformer.transform(source, result);
Add Comment
Please, Sign In to add comment