Need XML Structure & Parse Advice
Hello,
I am a CF Programmer who would normally use SQL as a datasource, however for a new project I thought I'd use XML where possible. I wanted to create an XML based navigation for the site but am having trouble figuring out the right way to structure the XML items and also parsing them back out.
The site is for travel type info, and as we grow counties, areas, projects, etc. will be added - So I saw the structure like so:
<data>
<county>County A</county>
<project>A Map</project>
<project>A Article</project>
<project>A Book</project>
</data>
This is of course wrong, and i have tried variations of the structure, but I know one of you gurus can point me in the right direction...
The gist is that each "County" can and will have many "Projects" associated with it. So I wanted to define some Counties and have their 'children' be the associated projects, so a nav would read like;
COUNTY A
A Map
A Article
A Book
COUNTY B
B Map
B Article
B Map
But no matter what I do, spry, cfml, etc I cannot query the XML for the PARENT (County) and then the CHILDREN that go only with that Parent.
without repeating the parent with each child.
Obviously this is not a big deal, for some reasons my skillset is broken today (including finding a tutorial that solves this!) So any point in the right direction will be greatly appreciated.
Thanks
