You are not logged in.
Pages: 1
I know that is possible to work with XML instead JSON (see here). But is there an XPATH implementation to work with?
FPC has an implementation of XPATH but, it's based on WideString. I would like to know if we have a (fastest) implementation by Synopse, which works on Delphi and FPC.
Offline
No, XML support is very small, and not intended to be bigger...
We are JSON-grounded, which is a per-representation format, whereas XML is a strongly typed format.
There won't be any XPATH implementation, since there is no real XML implementation available - just simple (but fast) JSON to XML-compatible conversion.
Offline
All right.
But, as I have many systems that works with XML, what is the simplest way to use mORMot to work with?
In mostly cases, I need to receive a XML, parse (using XPATH), create a new one, and send it back.
I mean, is that possible (and fast) to use some mORMot "XML to JSON" functions, parse the JSON, create a new one, and use "JSON to XML" to send it as XML at the end?
Last edited by mdbs99 (2018-02-13 14:52:55)
Offline
mdbs99,
This might be useful for you. You can pick the functionality you need and combine with the mORMot infrastructure.
Offline
XML is too verbose and is such a mess, JSON is better.
Food for thought: http://jmespath.org/
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
the reality is not perfect and usage of JSON is not always possible. Personally I like the idea of :
https://www.npmjs.com/package/xml-js
some ideas from xml-js may be used in mORMot.
best regards,
Maciej Izak
Offline
XML is too verbose and is such a mess, JSON is better.
Food for thought: http://jmespath.org/
It's not about verbosity or not. It's about integration with other systems.
As you can see above, there are some that think the same.
Offline
@mdbs99, yes, you have a valid point
@mpv, do we have a compatible Node.Js package list for syNode?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Pages: 1