Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
http request result used in macro
I would like to receive data from a VLC HTTP request. The request url is in this form
Copy      Help

[Image: vlcResult.jpg]

Above is an example of what it returns. How can I create variables from the nodes? I tried to use the example in a post I saw that uses iXml but I could not get it to work. To be clear for example how can I create a variable for a node like <state></state> which should result in "stopped"? Thanks
If need only state, the simplest way to get it is a regular expression. Or if don't want to learn regular expressions, use function find and str.get.
If need a single XML element, usually is used XPath, but this XML is too simple. Just get the child element.

Macro Macro201
Copy      Help
str xml=

IXml x._create
IXmlNode e = x.RootElement.Child("state")
out e.Value

Forum Jump:

Users browsing this thread: 1 Guest(s)