Is there any XML to object converter that can convert back again, which ensures the files are exact duplicates? I can’t see to find any on CPAN that ensure the files can go in and out exactally as they are made.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is not possible in any language, as XML has variant ways of representing the same data.
Textual data containing xml entities can be represented either by escaping the entities or by wrapping stuff in CDATA sections.
Empty tags can be represented as either
<tag/>or<tag></tag>.And some whitespace is insignificant and may be altered.
As multiple textual xml representations can represent the same DOM structure, it’s impossible to guarantee reading xml text into DOM, writing it out again and getting exactly the same.