Zipper for creating xml requests? Zipper for creating xml requests? xml xml

Zipper for creating xml requests?


As Tomalak said in a comment,

That's like trying to create meaningful strings by walking the regex. It doesn't work that way.

A zipper helps you take a meandering walk through a structure, inspecting parts and optionally modifying them; in the end, you have the option of "zipping up" the zipper to get a modified version of the original. There are at least two major problems with your idea:

  1. The structure of an XSD is not the same as, or even terribly similar to, the structure of the documents it encodes. If you were to use a zipper to modify an XSD so as to produce XML valid according to that XSD, you will end up restructuring it completely, and the type system will not help you get this right.

  2. A zipper is a way of focusing on part of some data structure. Before you think too hard about the zipper, you should think about what data structure you're unzipping. Depending on what you're doing, you may or may not find it useful to use a zipper, but the zipper and its invariants will always relate back to the structure and its invariants.


Once had the occasion to test this tool: camprocessorIt did actually work and produce valid XML files that you could customize with data from databases.

There is some guidance on this at OASIS


Create an XMLHttpRequest Object

All modern browsers (IE7+, Firefox, Chrome, Safari, and Opera) have a built-in XMLHttpRequest object.

Syntax for creating an XMLHttpRequest object:

xmlhttp=new XMLHttpRequest();