Article View: pl.comp.lang.python
Article #27666usuwanie pustych węzłów w XML-ach
From: blue
Date: Tue, 21 Sep 2010 21:36
Date: Tue, 21 Sep 2010 21:36
11 lines
1543 bytes
1543 bytes
Mam sporą liczbę XML-i, które chce "odchudzić" czyli pousuwać z nich puste węzły np. wykorzystując bibliotekę lxml. Chodzi o to że mam np. coś takiego: <root> <child>Child 1</child> <child></child> -> węzeł do usunięcia <another>Child 3</another> </root> Ogólnie chciałbym taką operację przeprowadzić dla wszystkich plików na raz (jest ich kilka tysięcy).
Technical Details
Message-ID:
<2d9acd59-978a-4d7f-8ed0-b93a98a52a55@i17g2000vbq.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!feeder.erje.net!proxad.net!feeder1-2.proxad.net!74.125.46.134.MISMATCH!postnews.google.com!i17g2000vbq.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!feeder.erje.net!proxad.net!feeder1-2.proxad.net!74.125.46.134.MISMATCH!postnews.google.com!i17g2000vbq.googlegroups.com!not-for-mail From: blue <lukaszwojnowski@gmail.com> Newsgroups: pl.comp.lang.python Subject: usuwanie pustych węzłów w XML-ach Date: Tue, 21 Sep 2010 14:36:08 -0700 (PDT) Organization: http://groups.google.com Lines: 14 Message-ID: <2d9acd59-978a-4d7f-8ed0-b93a98a52a55@i17g2000vbq.googlegroups.com> NNTP-Posting-Host: 213.134.184.254 Mime-Version: 1.0 X-Trace: posting.google.com 1285104968 27456 127.0.0.1 (21 Sep 2010 21:36:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 21 Sep 2010 21:36:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i17g2000vbq.googlegroups.com; posting-host=213.134.184.254; posting-account=YYmHuAoAAABndlBKSvoL_4fD_W2gx2nt User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 GTB7.1,gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit