Forum Navigation
Problem parsing XML
Moderators:
kris
Posted: 03/27/09 07:46:15 Modified: 03/27/09 11:50:28Hi, I'm a D/Tango newbie. I have to confess I find D/Tango confusing. It seems there is some conflict between D and Tango what versions are compatible etc. Then I find Tango difficult to use, but I do not give in easily. in the end I'll be good at D/Tango. Right now I have a simple problem that have stopped me for a day now. I try to pick up an XML structure:
<serverparms> <datawarehouse name='bait'> <cmd>start.php</cmd><option>logmode=warn</option>... </datawarehouse> <datawarehouse name='notwanted'/> ... </serverparms>I like to search this XML for a <datawarehouse> with name='bait' and pick up all children in an associative array, but I have no success. I tried some promising examples but they all seem to fail: e.g.
auto result = root.query.descendant("country").filter((serverdoc.Node node) { return contains!(char) (node.attributes.name("id").value, 'B');});this example fails to compile with a errmsg something like Visitor do not have a name attribute or similar. ANY HELP HIGHLY APPRECIATED