Home » U++ Library support » U++ Core » Is XML compression possible by U++ library call? ([Question])
Is XML compression possible by U++ library call? [message #43226] |
Tue, 10 June 2014 20:44  |
 |
Klugier
Messages: 1099 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  |
 |
mirek
Messages: 14257 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.
|
|
|
Goto Forum:
Current Time: Mon May 12 08:25:20 CEST 2025
Total time taken to generate the page: 0.02020 seconds
|