[xml-types] Help needed: Constructing XML documents

Hi, I want to construct a Document object from scratch. Using only xml-types, this can be somewhat cumbersome. Is there a better way? Maybe a package? Aristid

On Sun, Jul 3, 2011 at 12:41 AM, Aristid Breitkreuz
Hi, I want to construct a Document object from scratch. Using only xml-types, this can be somewhat cumbersome. Is there a better way? Maybe a package?
Aristid
One approach is to use the parse functions from xml-enumerator. Something I've toyed around with before is adding the ability to Hamlet to produce XML documents. Is this the kind of idea you're looking for? Michael

Hamlet for XML would probably help, yeah. Does it work already, or are there
some necessary changes? Although it's maybe a bit too heavyweight for just
generating small XML documents that tell S3 to apply location constraints?
Parsing from a string would not make any sense as the next thing I do is
send it down a socket. I want to use Document for the added safety, there.
If there's a safe option that directly generates a ByteString or Builder,
that would work too.
Aristid
2011/7/3 Michael Snoyman
On Sun, Jul 3, 2011 at 12:41 AM, Aristid Breitkreuz
wrote: Hi, I want to construct a Document object from scratch. Using only xml-types, this can be somewhat cumbersome. Is there a better way? Maybe a package?
Aristid
One approach is to use the parse functions from xml-enumerator. Something I've toyed around with before is adding the ability to Hamlet to produce XML documents. Is this the kind of idea you're looking for?
Michael

It has not been done yet. You *could* use Hamlet itself in XML mode,
but it's not a direct tie-in with xml-types. I definitely have a few
projects at work that would be much cleaner with Hamlet instead of
directly calling the xml-types constructors. Plus combining Hamlet and
the Cursor library would really give XSLT a run for its money...
I'm not sure when I'll have a chance to work on this. If anyone is
interesting in taking some initiative here, let me know, I'll be happy
to give guidance on where to start.
Michael
On Sun, Jul 3, 2011 at 1:59 PM, Aristid Breitkreuz
Hamlet for XML would probably help, yeah. Does it work already, or are there some necessary changes? Although it's maybe a bit too heavyweight for just generating small XML documents that tell S3 to apply location constraints? Parsing from a string would not make any sense as the next thing I do is send it down a socket. I want to use Document for the added safety, there. If there's a safe option that directly generates a ByteString or Builder, that would work too.
Aristid
2011/7/3 Michael Snoyman
On Sun, Jul 3, 2011 at 12:41 AM, Aristid Breitkreuz
wrote: Hi, I want to construct a Document object from scratch. Using only xml-types, this can be somewhat cumbersome. Is there a better way? Maybe a package?
Aristid
One approach is to use the parse functions from xml-enumerator. Something I've toyed around with before is adding the ability to Hamlet to produce XML documents. Is this the kind of idea you're looking for?
Michael
participants (2)
-
Aristid Breitkreuz
-
Michael Snoyman