[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ProgSoc] XML languages



Thomas Given-Wilson wrote:
Again something a bit more complex:
let g = fun x -> (x = { <li>one</li>, <li>two</li> })
let results = for *each element* in *xmldoc*
		if (g *each element*) then li
Does this mean this can't be done to your knowledge, or are you just
passing over because it is trivial based on the above solution?
Does what mean what can't be done?

One thing that you can do in XML that makes life tricky is this:

 <a href="/foo">Something <em>hard</em>.</a>

A JSON representation would have a more sane (though less terse) syntax, e.g.:
 {
   name: "a",
   attr: { href: "/foo" },
   elem: [
     "Something", {
       name: "em",
       attr: {},
       elem: [
         "hard"
       ]
     },
     "."
   ]
 }










-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@xxxxxxxxxxxxxxxxxxx
If you are having trouble, ask owner-progsoc@xxxxxxxxxxxxxxxxxx for help.