Re: Xml import / export from string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What I'm writing is a mathml parser / writer.
I'm working over here: https://gerrit.libreoffice.org/c/core/+/120116

I'm trying to implement it with infinite depth (as long as you have enough memory).
Preferably efficient since it's gonna be called each time the user presses a key.

There are two modes:
 - from file ( save/write )
 - from buffer ( text box containing the code -> get OUString )

It is part of a project of making starmath full mathml compatible.
It will use mathml if the textbox contains the following: <?xml version="1.0" encoding="UTF-8"?>

I've already implemented the io stuff thanks to your advice with the memory stream.
You can check it out if you want.



El sáb, 7 ago 2021 a las 13:01, Tomaž Vajngerl (<quikee@xxxxxxxxx>) escribió:
Hi Dante,

On Sat, Aug 7, 2021 at 7:21 PM Dante Doménech <dante19031999@xxxxxxxxx> wrote:
Hello. I'm working right now at something that requires to be able to parse xml from and to a string / ustring ( or other as long as I can get back the string ) and does not pass by a file (just wasting writes of the harddisk and a performance issue).

Why not a SvMemoryStream instead of an OString (and definitely not an OUString)?


I'm using SvXMLExport and SvXMLImport.

For lightweight XML writing and parsing (small size, non performance critical, no strict schema, non-parallel parsing) I prefer tools::XmlWriter and tools::XmlWalker, which are just wrappers around libxml2. You didn't describe what you want to use it for so it is hard to judge if it is appropriate or not.


If you know where in the code is an example it is also good.
 
See the tests in tools.


Thank you for your time.

Regards, Tomaž

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux