Товарищи, кто нибудь пробовал с помощью ФБ «Скрипт С#» вытягивать от куда нибудь данные по XML? Поделитесь опытом. Или может у кого есть пример? А то, к сожалению, я не силен в C#, т.к до этого не было необходимости.
Если конкретно, то:
Имеется блок мониторинга Danfoss AK-SC 355 со своим IP адресом, из которого по XML нужно вытягивать данные, а именно показания датчиков температуры.
Примеры запросов из руководства:
4 Command Overview
Both requests and responses are coded in XML. HTTP is the protocol. Requests are made via
the POST command. Both request parameters and the responses are carried in the body of the
HTTP packet which are sent to and received from URL http://999.999.999.999/html/xml.cgi
where 999.999.999.999 is the AK-SC’s ip address
запрос
< cmd action= “read_sensor” units=”string” valid_only=”1”>
< sensor node=“int” mod=“ int” point=“ int”/>
< sensor node=“ int” mod=“ int” point=“ int”/>
…
…
…
< sensor node=“ int” mod=“ int” point=“ int”/>
</cmd>
ответ
<resp units=”string” action=” read_sensor” error=”0”>
< sensor node=“int” mod=“ int” point=“ int” name=”string”>signed decimal</ sensor >
< sensor node=“ int” mod=“ int” point=“ int” name=”string”>signed decimal</ sensor >
…
…
…
< sensor node=“ int” mod=“ int” point=“ int” name=”string”>signed decimal </ sensor >
</resp>
пример:
Example 1
< cmd action= “read_sensor” units=”S”>
< sensor node=“1” mod=“2” point=“17”/>
< sensor node=“2” mod=“1” point=“18”/>
</cmd>
< resp units=”S” action=” read_sensor” error=”0”>
< sensor node=”1” mod=”2” point=”17” name=”Comp 1”>0.0 Bar</ sensor >
< sensor node=”2” mod=”1” point=”18” name=”Case 1”>-17.8 °C </ sensor >
</resp>
эти показания нужно записывавать в выходную переменную ФБ "скрипт C#"
повторюсь, я с С# никогда не сталкивался, хочу понять как должен выглядеть код? Какие операторы прописывать? Интуитивно догадываюсь, что using System.Xml а дальше...