Americký výrobce čipů Intel plánuje propustit více než 20 procent zaměstnanců. Cílem tohoto kroku je zjednodušit organizační strukturu ve firmě, která se potýká s problémy.
Byla vydána OpenMandriva Lx 6.0 s kódovým názvem Vanadium. Přehled novinek v poznámkách k vydání.
CSIRT.CZ, český národní CERT provozovaný na základě veřejnoprávní správní smlouvy společností CZ.NIC, shrnuje patnáct let svého fungování pod tímto sdružením: CSIRT.CZ – 15 let ve sdružení CZ.NIC.
Commodore OS Vision (Wikipedie) byl vydán v nové verzi 3.0. Jedná se o linuxovou distribuci určenou pro fanoušky značky Commodore. Předinstalována je na počítačích Commodore 64x.
Spolek OpenAlt zve příznivce otevřených řešení a přístupu na 208. brněnský sraz, který proběhne v pátek 25. dubna od 18:00 ve studentském klubu U Kachničky na Fakultě informačních technologií Vysokého učení technického na adrese Božetěchova 2/1.
Ve svém článku Getting Forked by Microsoft popisuje autor programu Spegel svoji nepříjemnou zkušenost s firmou Microsoft. Firma ho kontaktovala a zpočátku to vypadalo, že by mohlo jít o oboustranně prospěšnou spolupráci, autor tedy ochotně odpovídal na jejich otázky ohledně architektury programu a pomáhal jim ho zprovoznit. Následně komunikace ze strany Microsoftu utichla. Autor předpokládal, že zřejmě došlo ke změně priorit a firma
… více »Společnost Notion Labs stojící za softwarovou platformou pro spolupráci Notion (Wikipedia) oficiálně představila (YouTube) poštovního klienta Notion Mail. Aktuálně funguje pouze nad Gmailem.
Byla vydána nová verze 9.12 z Debianu vycházející linuxové distribuce DietPi pro (nejenom) jednodeskové počítače. Přehled novinek v poznámkách k vydání.
Na čem aktuálně pracují vývojáři GNOME a KDE Plasma? Pravidelný přehled novinek v Týden v GNOME a Týden v KDE Plasma.
Ubuntu 25.10 bude (𝕏) Questing Quokka (pátrající klokan quokka).
<?xml version="1.0" encoding="Windows-1250"?> <rsp:responsePack version="2.0" id="001" state="ok" note="" programVersion="9801.8 (19.5.2011)" xmlns:rsp="http://www.stormware.cz/schema/version_2/response.xsd" xmlns:rdc="http://www.stormware.cz/schema/version_2/documentresponse.xsd" xmlns:typ="http://www.stormware.cz/schema/version_2/type.xsd" xmlns:lst="http://www.stormware.cz/schema/version_2/list.xsd" xmlns:lStk="http://www.stormware.cz/schema/version_2/list_stock.xsd" xmlns:lAdb="http://www.stormware.cz/schema/version_2/list_addBook.xsd" xmlns:acu="http://www.stormware.cz/schema/version_2/accountingunit.xsd" xmlns:inv="http://www.stormware.cz/schema/version_2/invoice.xsd" xmlns:vch="http://www.stormware.cz/schema/version_2/voucher.xsd" xmlns:int="http://www.stormware.cz/schema/version_2/intDoc.xsd" xmlns:stk="http://www.stormware.cz/schema/version_2/stock.xsd" xmlns:ord="http://www.stormware.cz/schema/version_2/order.xsd" xmlns:ofr="http://www.stormware.cz/schema/version_2/offer.xsd" xmlns:enq="http://www.stormware.cz/schema/version_2/enquiry.xsd" xmlns:vyd="http://www.stormware.cz/schema/version_2/vydejka.xsd" xmlns:pri="http://www.stormware.cz/schema/version_2/prijemka.xsd" xmlns:bal="http://www.stormware.cz/schema/version_2/balance.xsd" xmlns:pre="http://www.stormware.cz/schema/version_2/prevodka.xsd" xmlns:vyr="http://www.stormware.cz/schema/version_2/vyroba.xsd" xmlns:pro="http://www.stormware.cz/schema/version_2/prodejka.xsd" xmlns:con="http://www.stormware.cz/schema/version_2/contract.xsd" xmlns:adb="http://www.stormware.cz/schema/version_2/addressbook.xsd" xmlns:prm="http://www.stormware.cz/schema/version_2/parameter.xsd" xmlns:lCon="http://www.stormware.cz/schema/version_2/list_contract.xsd" xmlns:ctg="http://www.stormware.cz/schema/version_2/category.xsd" xmlns:ipm="http://www.stormware.cz/schema/version_2/intParam.xsd"> <rsp:responsePackItem version="2.0" id="li1" state="ok"> <lst:listInvoice version="2.0" dateTimeStamp="2011-05-27T10:47:23Z" dateValidFrom="2011-05-27" state="ok"> <lst:invoice version="2.0"> <inv:invoiceHeader> <inv:id>20</inv:id> <inv:invoiceType>issuedInvoice</inv:invoiceType> <inv:number> <typ:id>26</typ:id> <typ:ids>1101</typ:ids> <typ:numberRequested>110100001</typ:numberRequested> </inv:number> <inv:symVar>110100001</inv:symVar> <inv:date>2011-01-30</inv:date> <inv:dateTax>2011-01-30</inv:dateTax> <inv:dateAccounting>2011-01-30</inv:dateAccounting> <inv:dateDue>2011-02-13</inv:dateDue> <inv:accounting> <typ:id>17</typ:id> <typ:ids>3Fv</typ:ids> </inv:accounting> <inv:classificationVAT> <typ:id>251</typ:id> <typ:ids>UD</typ:ids> <typ:classificationVATType/> </inv:classificationVAT> <inv:text>Fakturujeme Vám zboží dle Vaší objednávky: </inv:text> <inv:partnerIdentity> <typ:id>15</typ:id> <typ:address> <typ:company>INTEAK spol. s r. o.</typ:company> <typ:division>prodejna</typ:division> <typ:name>David Jánský</typ:name> <typ:city>Benešovice</typ:city> <typ:street>Jiřího z Poděbrad 35</typ:street> <typ:zip>463 48</typ:zip> <typ:ico>85236972</typ:ico> <typ:dic>CZ85236972</typ:dic> </typ:address> <typ:shipToAddress> <typ:company/> <typ:division/> <typ:name/> <typ:city/> <typ:street/> </typ:shipToAddress> </inv:partnerIdentity> <inv:myIdentity> <typ:address> <typ:company>Novák </typ:company> <typ:surname>Novák</typ:surname> <typ:name>Jan</typ:name> <typ:city>Jihlava 1</typ:city> <typ:street>Horní</typ:street> <typ:number>15</typ:number> <typ:zip>586 01</typ:zip> <typ:ico>12345678</typ:ico> <typ:dic>CZ12345678</typ:dic> <typ:phone>569 876 542</typ:phone> <typ:mobilPhone>602 852 369</typ:mobilPhone> <typ:fax>564 563 216</typ:fax> <typ:email>info@novak.cz</typ:email> <typ:www>www.novak.cz</typ:www> </typ:address> </inv:myIdentity> <inv:dateOrder>2011-01-22</inv:dateOrder> <inv:paymentType> <typ:id>1</typ:id> <typ:ids>příkazem</typ:ids> <typ:paymentType>draft</typ:paymentType> </inv:paymentType> <inv:account> <typ:id>2</typ:id> <typ:ids>KB</typ:ids> </inv:account> <inv:symConst>0308</inv:symConst> <inv:centre> <typ:id>1</typ:id> <typ:ids>BRNO</typ:ids> </inv:centre> <inv:activity> <typ:id>2</typ:id> <typ:ids>NÁBYTEK</typ:ids> </inv:activity> <inv:liquidation> <typ:date>2011-02-12</typ:date> <typ:amountHome>356</typ:amountHome> </inv:liquidation> </inv:invoiceHeader> <inv:invoiceDetail> <inv:invoiceItem> <inv:id>19</inv:id> <inv:text>Židle Z220</inv:text> <inv:quantity>2.0</inv:quantity> <inv:unit>ks</inv:unit> <inv:coefficient>1.0</inv:coefficient> <inv:rateVAT>high</inv:rateVAT> <inv:discountPercentage>0.0</inv:discountPercentage> <inv:homeCurrency> <typ:unitPrice>1968</typ:unitPrice> <typ:price>3936</typ:price> <typ:priceVAT>787.2</typ:priceVAT> <typ:priceSum>4723.2</typ:priceSum> </inv:homeCurrency> <inv:code>Z220</inv:code> <inv:guarantee>0</inv:guarantee> <inv:guaranteeType>none</inv:guaranteeType> <inv:stockItem> <typ:store> <typ:id>1</typ:id> <typ:ids>ZBOŽÍ</typ:ids> </typ:store> <typ:stockItem> <typ:id>27</typ:id> <typ:ids>Z220</typ:ids> <typ:PLU>650</typ:PLU> </typ:stockItem> </inv:stockItem> </inv:invoiceItem> <inv:invoiceItem> <inv:id>20</inv:id> <inv:text>Konferenční stolek chrom</inv:text> <inv:quantity>1.0</inv:quantity> <inv:unit>ks</inv:unit> <inv:coefficient>1.0</inv:coefficient> <inv:rateVAT>high</inv:rateVAT> <inv:discountPercentage>0.0</inv:discountPercentage> <inv:homeCurrency> <typ:unitPrice>7680</typ:unitPrice> <typ:price>7680</typ:price> <typ:priceVAT>1536</typ:priceVAT> <typ:priceSum>9216</typ:priceSum> </inv:homeCurrency> <inv:note>Rozměr: 120 x 60</inv:note> <inv:code>Konf11</inv:code> <inv:guarantee>0</inv:guarantee> <inv:guaranteeType>none</inv:guaranteeType> <inv:stockItem> <typ:store> <typ:id>1</typ:id> <typ:ids>ZBOŽÍ</typ:ids> </typ:store> <typ:stockItem> <typ:id>10</typ:id> <typ:ids>Konf11</typ:ids> <typ:PLU>625</typ:PLU> </typ:stockItem> </inv:stockItem> </inv:invoiceItem> <inv:invoiceItem> <inv:id>21</inv:id> <inv:text>Křeslo čalouněné 1320</inv:text> <inv:quantity>4.0</inv:quantity> <inv:unit>ks</inv:unit> <inv:coefficient>1.0</inv:coefficient> <inv:rateVAT>high</inv:rateVAT> <inv:discountPercentage>0.0</inv:discountPercentage> <inv:homeCurrency> <typ:unitPrice>5988</typ:unitPrice> <typ:price>23952</typ:price> <typ:priceVAT>4790.4</typ:priceVAT> <typ:priceSum>28742.4</typ:priceSum> </inv:homeCurrency> <inv:code>Kř1320</inv:code> <inv:guarantee>0</inv:guarantee> <inv:guaranteeType>none</inv:guaranteeType> <inv:stockItem> <typ:store> <typ:id>1</typ:id> <typ:ids>ZBOŽÍ</typ:ids> </typ:store> <typ:stockItem> <typ:id>13</typ:id> <typ:ids>Kř1320</typ:ids> <typ:PLU>627</typ:PLU> </typ:stockItem> </inv:stockItem> </inv:invoiceItem> </inv:invoiceDetail> <inv:invoiceSummary> <inv:roundingDocument>up2one</inv:roundingDocument> <inv:roundingVAT>none</inv:roundingVAT> <inv:homeCurrency> <typ:priceNone>0</typ:priceNone> <typ:priceLow>0</typ:priceLow> <typ:priceLowVAT>0</typ:priceLowVAT> <typ:priceLowSum>0</typ:priceLowSum> <typ:priceHigh>35568</typ:priceHigh> <typ:priceHighVAT>7113.6</typ:priceHighVAT> <typ:priceHighSum>42681.6</typ:priceHighSum> <typ:round> <typ:priceRound>0.4</typ:priceRound> </typ:round> </inv:homeCurrency> </inv:invoiceSummary> </lst:invoice> </lst:listInvoice> </rsp:responsePackItem> </rsp:responsePack>Ako dostanem dáta z typ:priceHighSum, typ:name, typ:ico, typ:company, typ:date? Toto mi nefunguje:
group='lst:invoice' for group in root.findall('inv:invoiceHeader'): invoiceHeader = group.find('inv:id').text print invoiceHeader
Řešení dotazu:
In [6]: t=ElementTree().parse('/tmp/windoury.xml') In [18]: t.tag Out[18]: '{http://www.stormware.cz/schema/version_2/response.xsd}responsePack' In [19]: t.findall('.//{http://www.stormware.cz/schema/version_2/invoice.xsd}invoiceHeader') Out[19]: [<Element '{http://www.stormware.cz/schema/version_2/invoice.xsd}invoiceHeader' at 0x29eb450>]IPython rulez BTW.
ET.register_namespace("inv", "http://www.stormware.cz/schema/version_2/invoice.xsd")aby sa to dalo pouzivat s inv:id, ale nejako to nefunguje u mna
Traceback (most recent call last): File "C:\tutorial\temp_xml2.py", line 34, in module> for listInvoice in root.findall('inv:invoiceHeader'): File "C:\Python27\LIB\xml\etree\ElementTree.py", line 390, in findall return ElementPath.findall(self, path, namespaces) File "C:\Python27\LIB\xml\etree\ElementPath.py", line 293, in findall return list(iterfind(elem, path, namespaces)) File "C:\Python27\LIB\xml\etree\ElementPath.py", line 259, in iterfind token = next() File "C:\Python27\LIB\xml\etree\ElementPath.py", line 83, in xpath_tokenizer raise SyntaxError("prefix %r not found in prefix map" % prefix) SyntaxError: prefix 'inv' not found in prefix map >>>
Tiskni
Sdílej: