Quote:
Originally Posted by Nick_1964
Dear friends.
When I opened a commercial ebook that I bought (social DRM) I noticed the book is really slow.
So I looked to the code and that was terrible.. no way I can clean this by hand... is there software (I hope free because it is for only one book,until now) or an online tool that can clean it for me ??
Look at the spoiler for a example.
In real..this are only a couple of lines from the book...
|
Ew.
That's funny, because that markup looks similar to what InDesign produces, in terms of style tags covering everything. I actually already wrote a script that handles this. Specifically, it does this:
Code:
// Start:
<p><span class="123">Hello</span> <span class="123">World</span><span class="123">!</span></p>
// End:
<p><span class="123">Hello World!</span></p>
For example, I took your input and produced this:
Because I'm using an XML parsing engine, it does encode the apostrophes, ampersands and such. Is this acceptable?