I'm clearly not understanding how to parse my XML file. I can get the first "child" but I don't know how to get children after that.
To get the league name I use the below code which was pulled from a cffile which retrieved the XML doc and that works fine:
<cfdump var="#mydoc#">
#mydoc.league.xmlattributes.name# = NBA
In the below, what would be the code to get the "home" team "name"?
Cheers!
My XML:
xml document [short version] |
---|
league | XmlText | | XmlAttributes | struct |
---|
alias | NBA | id | 4353138d-4c22-4396-95d8-5f587d2df25c | name | NBA | xmlns | |
| daily-schedule | XmlText | | XmlAttributes | | games | XmlText | | game | XmlText | | XmlAttributes | struct |
---|
away_team | 583ecc9a-fb46-11e1-82cb-f4ce4684ea4c | coverage | full | home_team | 583ecea6-fb46-11e1-82cb-f4ce4684ea4c | id | b55c5579-950b-4726-8d36-6467f6caa772 | scheduled | 2015-12-25T17:00:00+00:00 | status | scheduled |
| venue | XmlText | | XmlAttributes | struct |
---|
address | 601 Biscayne Blvd. | capacity | 19600 | city | Miami | country | USA | id | b67d5f09-28b2-5bc6-9097-af312007d2f4 | name | American Airlines Arena | state | FL | zip | 33132 |
|
| home | XmlText | | XmlAttributes | struct |
---|
alias | MIA | id | 583ecea6-fb46-11e1-82cb-f4ce4684ea4c | name | Miami Heat |
|
|
|
|
|
|