Format of the SPF XML DIF file (last updated in v0.70): Made due to continous requests. Has no practical use for me (too large and cumbersome compared to the binary DIF), but who knows :) Any XML DIF file must begin with SPFX signature starting from zero file offset. Then, standard Windows line break must be present. First line of the file will be ignored during XML parsing. Then, XML DIF follows. It DOES NOT begin with XML DTD definition and it MAY OPTIONALLY contain XML header () but this header may and will be completely ignored. Tags: ... - denotes DIF contents. All other tags must be placed inside these tags. Container: document Parameters: PHONE: phone ID (mandatory) SOFTWARE: software ID (optional) Contains: other tags ... - standard DIF comment (dIFC block) Container: Parameters: none Contains: DIF comment, hex-encoded - standard DIF check (dChK block) Container: Parameters: none Contains: none ... - standard DIF NOR data (NORD block) Container: Parameters: ADDR: address in NOR flash (mandatory), hex-encoded Contains: NOR data, hex-encoded ... - standard DIF NOR reversal data (nOrR block) Container: Parameters: ADDR: address in NOR flash (mandatory), hex-encoded Contains: NOR data, hex-encoded ... - standard DIF TFS file (TFSF block) Container: Parameters: NAME: full TFS file name with paths, "/" as path separator (mandatory) ", ', &, <, > have default meaning Contains: TFS file data, hex-encoded ... - standard DIF TFS folder (fLDR block) Container: Parameters: none Contains: full TFS folder name with full path, "/" as path separator (mandatory), may or may not begin and end with "/", ", ', &, <, > have default meaning All standard DIF block tag naming conventions apply here. Unknown tags inside DIF container with 4-character names will be treated according to these conventions. Unknown tags with other names or outside of DIF container will cause an error. Absence of mandatory parameters (or presence of unknown parameters) will cause an error. Hex encoding recodes each data byte to two chars within "0-9" and "A-F" range (any case letters), most significant char first. Undesirable characters will cause an error while loading. Spaces, CRs, LFs, TABs and some other non-significant characters are ignored but must occur on byte boundary. Caveat here: 'ABCD' is the same as 'AB CD', but 'ABC D' will cause an error loading. Be careful. You can also use short byte form with spaces: 'AB0C0D0EFF' is the same as 'AB C D E FF'. NOTE! Working with XML DIF's is painfully slow. Don't even complain if you try to make XML DIF with firmware and SGHFD hangs loading it thereafter. Don't use XML DIF's if not needed, and if it is, use them only for small patches. I'm against text-based binary containers and that'll be so. I will try to optimize XML DIF functions somewhen, but the real moment I'll do it on is still unknown.