I have a XML file like this
<?xml version="1.0" encoding="iso-8859-1"?>1
<!-- Time-stamp: "bibliography.xml 3 Mar 2008 16:24:04" -->2
<!DOCTYPE bibliography SYSTEM "bibliography.dtd" >3
<bibliography>4
<book key="Michard01" lang="fr">5
<title>XML langage et applications</title>
<author>Alain Michard</author>
<year>2001</year>
<publisher>Eyrolles</publisher>
<isbn>2-212-09206-7</isbn>
<url>http://www.editions-eyrolles/livres/michard/</url>
</book>
<book key="Zeldman03" lang="en">
<title>Designing with web standards</title>
<author>Jeffrey Zeldman</author>
<year>2003</year>
<publisher>New Riders</publisher>
<isbn>0-7357-1201-8</isbn>
</book>
...
</bibliography>6
I would like to encrypt the XML file to look like a string of 32 characters
like that :
6DA5F750-9CB7-3E81-74AD-21B3747BAC8T
That “like that”:
Looks pretty much like a GUID – a Globally unique identifierWikipedia.
It’s not encryption, but representing. So the GUID stands for the XML document.
There are many ways to generate these GUIDs, all these have their pros and cons so you need to decide on what works best for you in your case. On SO we have some QA material about all this (for example a listing related to PHP with XML and GUIDs), so just do some research until you’ve come up with what you’ve need. Let me know if you’ve got any more questions or problems doing so.