nytlabs/streamtools — pull request #331 by jacqui (2014-03-25 22:14:07+00:00)
Title: parsexml block

I ended up implementing this block by forking the mxj pkg and modifying it not to prepend attribute names with dashes.

The block expects xml data to come in wrapped in json, as our blocks that pass xml on format it that way.

Input:
{ "data": "bar"}

Rule:
{"Path": ".data"}

Outputs a map[string]interface{} in the end, in a kinda hacky way: marshalling the "NewMapXML" to json then unmarshalling it on the out channel.