O
O
os11112019-04-29 11:23:40
Python
os1111, 2019-04-29 11:23:40

Parser xml and widget for it, how to write in python?

Colleagues, tell me please!
There is a multilevel xml file like:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <GetCompanyStructureResponse xmlns="http://attribute.open.ru/service/spark/v2">
            <GetCompanyStructureResult xmlns:a="http://attribute.open.ru/service/spark/v2/CompanyStructure" 
      xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <ResultInfo>
                    <ErrorInfo i:nil="true" />
                    <ExecutionTime>275</ExecutionTime>
                    <ResultType>Ok</ResultType>
                </ResultInfo>
                <a:Reports>
                    <a:ReportCompanyStructure>
                        <a:AffiliatedCompaniesEgrul>
                            <ActualDate>2019-03-18T00:00:00</ActualDate>
                            <AffiliatedCompanyEgrul>
                                <AffiliatedCompanyEgrul>
                                    <Address>Rostov </Address>
                                    <FullName>OOO</FullName>
                                    <Inn>6143081351</Inn>
                                    <Manager>OOO Lukoil</Manager>
                                    <ManagerInn>2624033219</ManagerInn>
                                    <Name>OOO Vologda</Name>
                                    <Ogrn>1133443015210</Ogrn>
                                    <Okato>60412000000</Okato>
                                    <OkopfName>OOO</OkopfName>
                                    <Okpo>12158315</Okpo>
                                    <SparkId>8880940</SparkId>
                                    <ActualDate>2013-05-31T00:00:00</ActualDate>
                                    <SharePart>100</SharePart>
                                    <SharePartRur>214883422,18</SharePartRur>
                                </AffiliatedCompanyEgrul>
                                <AffiliatedCompanyEgrul>
                                    <Address>Rostov-on-Don </Address>
                                    <FullName>OOO</FullName>
                                    <Inn>6143081352</Inn>
                                    <Manager>OOO Lukoil</Manager>
                                    <ManagerInn>2624033229</ManagerInn>
                                    <Name>OOO Gorgorod</Name>
                                    <Ogrn>1133443015211</Ogrn>
                                    <Okato>60412000001</Okato>
                                    <OkopfName>OOO</OkopfName>
                                    <Okpo>12158315</Okpo>
                                    <SparkId>8880940</SparkId>
                                    <ActualDate>2013-05-31T00:01:00</ActualDate>
                                    <SharePart>100</SharePart>
                                    <SharePartRur>214883422,18</SharePartRur>
                                </AffiliatedCompanyEgrul>
                            </AffiliatedCompanyEgrul>
                        </a:AffiliatedCompaniesEgrul>
                    </a:ReportCompanyStructure>
                </a:Reports>
            </GetCompanyStructureResult>
        </GetCompanyStructureResponse>
    </s:Body>
</s:Envelope>

How to write a parser and a widget (in the form of buttons) that will expand like a tree when pressed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
qlkvg, 2019-04-29
@qlkvg

1. Decompose
Write parser and widget = write parser + write widget
2. Understand
I need to write an xml parser, for that I'll google it . Perhaps it makes sense to google something more specific , for sure my problem has already been solved before me. For the widget, I need a graphical interface, I'll google about it too . I note that people most often advise tkinter, it is worth paying attention to .
3. Write
???
PROFIT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question