PixInsight Forum (historical)

Software Development => PCL and PJSR Development => Topic started by: bitli on 2010 April 11 03:41:31

Title: Any XML parser reachable from Javascript?
Post by: bitli on 2010 April 11 03:41:31
Hi,
In 1.6 the process information is saved in a XML format, which is quite convenient to read.  I assume that there is a C++ XML parser in the PI code.  Would it be possible to call it from the Javascript to parse a file/string to DOM and make XPATH selections?
-- bitli
Title: Re: Any XML parser reachable from Javascript?
Post by: Juan Conejero on 2010 April 11 12:48:33
Hi Bitli,

The next version of PixInsight will include two new core JavaScript objects, namely XMLStreamReader and XMLStreamWriter. These objects will implement sequential reading and generation of XML code through an easy-to-use high-level interface.

XMLStreamReader and XMLStreamWriter, however, don't load or represent an XML document as a tree of nodes, in the fashion of the XPath specification. They will provide, however, the necessary functionality to decode common data types as numbers (both floating point and integer), dates and Booleans from XML attributes.
Title: Re: Any XML parser reachable from Javascript?
Post by: bitli on 2010 April 11 13:38:37
Thanks, should be good enough.
-- bitli