Advertisement
Guest User

Untitled

a guest
May 25th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
  2.  
  3. Node_List_User = xmldoc.getElementsByTagName('user')
  4. for node_list2 in Node_List_User:
  5. if (node_list2.getAttribute('password') == 'must-be-changed' or node_list2.getAttribute('password') == 'tomcat' or node_list2.getAttribute('password') == 'password'):
  6. comment2 = xmldoc.createComment(node_list2.toxml())
  7. print comment2.toxml()
  8.  
  9. xml.parsers.expat.ExpatError: not well-formed (invalid token): line 35, column 36
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement