Here is my XML. I have removed A LOT of what is actually in the XML file I am working with, for simplicity:
<State>
<Center ID="BOCC">
<Dispatch>
<Log>
<LogType>Traffic Collision - Ambulance Responding</LogType>
</Log>
<Log>
<LogType>Traffic Hazard</LogType>
</Log>
<Log>
<LogType>Pedestrian On A Highway</LogType>
</Log>
</Dispatch>
</Center>
<Center ID="SOMEOTHERCENTER">
<Dispatch>
<Log>
<LogType>Possible Fatality</LogType>
</Log>
<Log>
<LogType>Cargo or Hazardous Materials Spill</LogType>
</Log>
<Log>
<LogType>Pedestrian On A Highway</LogType>
</Log>
</Dispatch>
</Center>
</State>
I need ONLY the text of the LogType’s (FROM CENTER “BOCC” ONLY) to show up in a list component or trace the output… doesn’t matter… I can formulate it myself… I just need to only grab this specific data. I do not want to see any other results (e.g. from SOMEOTHERCENTER). Like show:
Traffic Collision - Ambulance Responding
Traffic Hazard
Pedestrian On A Highway
The actual file I’m working with (and can not alter) is http://media.chp.ca.gov/sa_xml/sa.xml.