perl: xml to object and back exactly

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.

Answers


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.


Need Your Help

Using vb.net dll in unmanaged c++ project

c++ vb.net com dll interop

I created a vb.net dll called "WSdll.dll".

java.lang.IllegalArgumentException: Host name may not be null, while firing a get request

java android apache http

I will appreciate your help on this, below is the code am trying to execute, but all am getting is this exception, I did many changes, but am not able to resolve this.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.