Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

How to convert backed up data to xml?

Feb 2, 2012 2:42AM PST

To maximise my backed up data, I would like to utilise conversion to xml somewhere in the procedure.

Is anyone here familiar with the procedure, and able to inform me on how to do this, and any issues related to storage & later retrieval?

Thanks.

Discussion is locked

- Collapse -
Answer
Sure. But wouldn't that BLOAT the size?
Feb 2, 2012 2:46AM PST
- Collapse -
Answer
Re: convert to xml
Feb 2, 2012 7:15AM PST

1. Open the in Notepad.
2. Add a line containing <?xml ?><data>at the top.
3. Add a line containing </data> at the bottom.
4. Save.
Now it's xml. Although it might contain not valid xml-characters. And - much more important - be truncated if it wasn't a text file. If it's truncated (most files are) you'll have to resort to the link Bob gave.
Repeat for each file.

Can be stored everywhere.

To retrieve the file later:
1. Open the file in Notepad.
2. Delete the 2 added lines.
3. Save.
Now it's back to what it was. If, however, you used the method in Bob's link you'll have to write a program to make it usable again.


By the way, how do you mean "maximizing data"?

Kees

- Collapse -
Talk about taking my breath away...!!!
Feb 2, 2012 12:23PM PST

i) Repeat for each, single file? I've now near 8K files,of which a significant proportion are .pdf format.

ii) Non-text formats such as .pdf or others such as.tiff (containing text) will become truncated & then have to be treated by such a program as mentioned by Bob? This requires specially writing a progrm to retrieve & re-convert the data?

iii) I say maximise the backup data, because I believe this to be the "ultimate" form of saving & preservation, you see. Xml can overcome obselence in technology, can it not ie. operating systems?

Thanks.

- Collapse -
Re: convert to xml
Feb 2, 2012 5:59PM PST

I think you misunderstand the meaning and importance of xml.

The 2 primary purposes of using xml:
a. A common language to be used by programs for information exchange between them.
b. A format used by programs for storing configuration and setup parameters and some other data.

The useful lifetime of an xml-message in sense a is anything between .1 second and 1 day.
The useful lifetime of an xml file in sense b is equal to the useful lifetime of the program that uses it.

That's about all it's useful for. You have to be a programmer to do anything with it.

Kees

- Collapse -
ii) Non-text formats such as .pdf or others such as.tiff (co
Feb 2, 2012 11:31PM PST

ii) Non-text formats such as .pdf or others such as.tiff (containing
text) will become truncated & then have to be treated by such a
program as mentioned by Bob? This requires specially writing a progrm to
retrieve & re-convert the data?

Yes. That's what you are asking for. I don't know why you wanted it to but XML but once in a while I get such a request. One time the client insisted and it cost another week to add it. There was no value over the method we had working but if a client asks you do do this, insists and will pay for it, you have little choice.

iii) I say maximise the backup data, because I believe this to be the
"ultimate" form of saving & preservation, you see. Xml can overcome
obselence in technology, can it not ie. operating systems?

That's your belief so now all you need to do is to create such a software system. Here I simply copy my files to my backups and they are ready to be copied back and used again.
Bob

- Collapse -
To be more complete ...
Feb 3, 2012 6:13AM PST

it can be done without truncation by using the command line copy command with /b switch to concatenate the header, the file and the footer.

But whatever method you do it without changing the contents of a binary file would only result in an utterly invalid xml-file. The only way it could ever be used again is to unconvert it using your very own special dedicated unconvert program.

So a much more complex conversion scheme is necessary than just adding a header and a footer (assuming you want your xml-files to be valid). Which makes your own very special dedicated unconvert program more complex also. And without that, you only would have a bunch of nonsense bytes that serves no useful purpose.

Kees