I need to have following attribute value in my XML node:
CommandLine="copy $(TargetPath) ..\..\
echo dummy > dummy.txt"
Actually this is part of a .vcproj file generated in VS2008. 
 means line break, as there should be 2 separate commands.
I’m using Python 2.5 with minidom to parse XML – but unfortunately I don’t know how to store sequences like 
, the best thing i can get is 
.
How can I store exactly 
?
UPD : Exactly speaking i have to store not &, but \r\n sequence in form of 

Well, you can’t specify that you want hex escapes specifically, but according to the DOM LS standard, implementations should change \r\n in attribute values to character references automatically.
Unfortunately, minidom doesn’t:
This is a bug in minidom. Try the same in another DOM (eg. pxdom):