daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. XmlSerializer xml = new XmlSerializer();           
  2.  
  3. xml.assembleXml("<root><type>ERROR</type><data>asdlkfajsflkajfs</data></root>");
  4.            
  5. xml.add("date","TODAY");
  6. System.out.println("type: " + xml.getValueOf("type"));
  7. System.out.println("date: " + xml.getValueOf("date"));
  8. System.out.println("data: " + xml.getValueOf("data"));
  9. System.out.println(xml);
  10.  
  11. /*
  12. type: ERROR
  13. date: TODAY
  14. data: asdlkfajsflkajfs
  15. <root><type>ERROR</type><data>asdlkfajsflkajfs</data><date>TODAY</date></root>
  16. */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top