Maintenance: Planio will be observing a scheduled maintenance window this Sunday, November 10, 2024 from 20:00 UTC until 21:00 UTC to perform important network maintenance in our primary data center. Your Planio account will be unavailable for a few minutes during this maintenance window.
Forums » Saxon-CE help »
Serialization question
Added by Jan Pour almost 12 years ago
In Saxon-CE documentation there is written: "There is no serializer, because output is either appended as a tree to the HTML DOM representing the target browser page, or as a tree or tree-fragment to an XML DOM."
How should I solve the situation when I get data out of HTML page and want to send it to the server in a XML form for further processing? Currently I do proprietary serialization of tree-fragments.. I think something like saxon:serialize() function would be great in Saxon-CE.
I agree, this functionality would be a very useful addition to the product.
There are two possible approaches you could consider: (a) escaping to Javascript (but unfortunately facilities for serializing an XML DOM vary from one browser to another), (b) write a simple serializer in XSLT. This has of course been done before: see for example
http://lenzconsulting.com/xml-to-string/xml-to-string.xsl
Please register to reply