Releasing tink_xml

60 views
Skip to first unread message

Juraj Kirchheim

unread,
May 28, 2015, 4:09:30 AM5/28/15
to haxe...@googlegroups.com
Hello again,

I am pleased to announce the release of tink_xml, an awesome macro powered way to swiftly read and "validate" (not in the formal sense of XML validation) XMLs and DOM nodes.


All feedback is welcome ;)

Best,
Juraj

Benjamin Dubois

unread,
May 28, 2015, 7:39:40 AM5/28/15
to haxe...@googlegroups.com
Seems nice really nice to me.

It misses the Xml generation/Writing so that it could be used as a kind of ORM for Xml.
That would be awesome.

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Juraj Kirchheim

unread,
May 29, 2015, 4:13:52 AM5/29/15
to haxe...@googlegroups.com
Yeah, I was thinking about that too, but it is impossible in general with the semantics I have used (particularly with enums), because they are really meant to make sense from weird XML structures (something that came up repeatedly in my day job).

Take the following:

enum InputElement {
   @:if(x.getAttribute('type') == 'checkbox') Checkbox(c:{ @:optional @:attr var checked:Bool; });
   @:if(x.getAttribute('type') == 'text') Textfield(c:{ @:optional @:attr var placeholder:String; });
}

To be able to XMLize that back you would need additional information and it is close to impossible to statically ensure that an XML node would survive a roundtrip. In fact the library rather aims at extracting whatever information you think is relevant, as opposed to preserving all the data from the XML (I actually developed this in a project where we were using an "API" where you could get two XMLs each a couple of MBs in size, and our cache shrunk to 200kb of haxe serialized data).

But I do see the usefulness of what you're asking for. Please dump any more concrete ideas you might have in the issue tracker ;)

Best,
Juraj
Reply all
Reply to author
Forward
0 new messages