Answer the question
In order to leave comments, you need to log in
Library for XML+XPath in Python?
I have an XML file with the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<DeviceData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DIGSIXML1-4.xsd">
<Settings>
<FunctionGroup Name="Данные энергосистемы 1">
<SettingPage Name="Парам ТТ/ТН">
<Parameter DAdr="0205" Name="Первичный номинальный ток ТТ" Type="Dec">
<Value>1000</Value>
<Comment Dimension="А" MinValue="10" MaxValue="5000" DefaultValue="1000"/>
</Parameter>
<Parameter DAdr="0206" Name="Вторичный номинальный ток ТТ" Type="Txt">
<Value>12922</Value>
<Comment Number="12921" Name="1А"/>
<Comment Number="12922" Name="5А"/>
<Comment DefaultValue="12921"/>
</Parameter>
<Parameter DAdr="0210" Name="U4 трансформатор напряжения подкл. как" Type="Txt">
<Value>12508</Value>
<Comment Number="12508" Name="Не подключен"/>
<Comment Number="12790" Name="Uдельта трансформатора напряжения"/>
<Comment DefaultValue="12508"/>
</Parameter>
</SettingPage>
</FunctionGroup>
</Settings>
</DeviceData>
//Parameter[@DAdr="0206"]/Comment[@Number=//Parameter[@DAdr="0206"]/Value/text()]/@Name
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question