Guest User

Untitled

a guest
Jun 13th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  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. */
Add Comment
Please, Sign In to add comment