Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XML Node Parsing.
Gone round and round and cannot get QM to parse what I need in an XML file. ... igitalDWML

Been having troubles getting data like:
<weather-conditions xsi:nil="true"/>
;;;;<value weather-type="thunderstorms" coverage="definitely"/>
;;;;<value additive="and" weather-type="rain" coverage="definitely"/>
;;;;<value weather-type="rain" coverage="slight chance"/>
<weather-conditions xsi:nil="true"/>
<weather-conditions xsi:nil="true"/>
<weather-conditions xsi:nil="true"/>
Macro Macro1424
Copy      Help

IntGetFile "" _s

IXml x=CreateXml

ARRAY(IXmlNode) a
x.Path("dwml/data/parameters/weather/weather-conditions" a)

int i
for i 0 a.len
,out "---------------"
,IXmlNode n=a[i].FirstChild
,,if(!n) break
,,out "weather-type=%s;  coverage=%s" n.AttributeValue("weather-type") n.AttributeValue("coverage")

This example will be useful for so many other functions I'm working on. Thank you so much for taking the time.


Forum Jump:

Users browsing this thread: 1 Guest(s)