Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Is XML compression possible by U++ library call? ([Question])
icon5.gif  Is XML compression possible by U++ library call? [message #43226] Tue, 10 June 2014 20:44 Go to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I would like to ask is there any way to compress XML in U++ by simply library call?

Suppose I have something like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MyXML>
    <Data>
        ...
    </Data>
</MyXML>


And I would like to have:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><MyXML><Data>...</Data></MyXML>


This task is not trivial and we can't write simply: "xml.Replace("\n", "") and xml.Replace("\t", "")". If internal tag possess this two characters then we will lose them.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Tue, 10 June 2014 20:46]

Report message to a moderator

Re: Is XML compression possible by U++ library call? [message #43228 is a reply to message #43226] Wed, 11 June 2014 08:08 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
If I supposed we are talking about XmlTag, then simple way, no. To be frank, I am not quite satisfied with XmlTag, there are two counter-requirements, on one side we would like to have nice-formated XML, on other, sometimes that is not what you exactly want....

If your XML is not huge and you are willing to sacrifice some performance, you can solve the issue by parsing to XmlNode, then using AsXML without XML_PRETTY. Or, perhaps, just use XmlNode.
Previous Topic: C++11: Vector is missing copy contructor/assignment operator
Next Topic: FIX FindBest in Algo.h
Goto Forum:
  


Current Time: Thu Mar 28 12:34:14 CET 2024

Total time taken to generate the page: 0.01890 seconds