Thanks for your replies. I will soon start working on write functions too. And maybe other functions. If anyone have suggestions. Feel free to tell me.

Hmmm well i was going to suggest a wright function till you said thay

What aboutPlugin.Xml compare [insert variation here]

and it would tell you what changes have been made between the two (your obviously well versed with coding so i expect your better then i am with regex ("okay so this pattern should return 1 if i type X=1... No match the fuck okay then what if i put this in X= 1... Capture group 1 = 1 finally pretty random that" thats a problem i got with this pattern /(?:X:|X=|X)(.[0-9]+)/i i dont see anything in there that needs a space))

Currently I'm trying to figure out how to change values from specific elements or attributes.I can only write new lines on the document at the moment. I will look into the compare functions too. Nice suggestion. It may also be useful to read files that are being edit by other programs.

And about regex that's not really my thing, you can try asking at stackoverflow.com.