Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93269

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

Path csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:text': 0.04; 'xml,': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'semantics': 0.09; 'specifying': 0.09; 'subject:keys': 0.09; 'ignore': 0.14; 'applies': 0.15; 'csv': 0.16; 'different,': 0.16; 'formats.': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:CSV': 0.16; 'subject:XML': 0.16; 'subject:headers': 0.16; 'subject:values': 0.16; 'unordered': 0.16; 'attribute': 0.18; 'stefan': 0.18; 'trying': 0.22; 'assign': 0.22; 'subject:will': 0.22; 'defined': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'define': 0.27; 'xml': 0.27; 'sequence': 0.27; "doesn't": 0.28; 'document,': 0.29; 'subject:that': 0.29; 'subject:) ': 0.32; 'changing': 0.34; 'to:addr:python-list': 0.35; 'formats': 0.35; 'but': 0.36; 'list,': 0.36; 'there': 0.36; 'data.': 0.36; 'subject:" ': 0.36; 'subject:: ': 0.37; 'received:org': 0.38; 'is,': 0.38; 'mean': 0.38; 'to:addr:python.org': 0.39; 'data': 0.40; 'subject:with': 0.40; 'received:de': 0.40; 'subject: (': 0.40; 'different': 0.64; 'choose': 0.68; 'obvious': 0.72; 'denis': 0.84; 'hand.': 0.84; 'subject:write': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)
Date Sun, 28 Jun 2015 09:46:36 +0200
References <14aeae7a-41ab-4619-8331-7995e2420e54@googlegroups.com> <mmivtd$fqa$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host ipservice-092-217-127-171.092.217.pools.vodafone-ip.de
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
In-Reply-To <mmivtd$fqa$1@dont-email.me>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.150.1435477605.3674.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1435477605 news.xs4all.nl 2880 [2001:888:2000:d::a6]:53555
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:93269

Show key headers only | View raw


Denis McMahon schrieb am 26.06.2015 um 09:44:
> xml data is an unordered list, and are trying to assign an order to it.
> 
> If the xml data was ordered, either each tag would be different, or each 
> tag would have an attribute specifying a sequence number.

XML is not unordered. The document order is well defined and entirely
obvious from the data. Whether this order is relevant and has a meaning or
not is, however, not part of XML itself but is left to the semantics of the
specific document format at hand. Meaning, XML document formats can choose
to ignore that order and define it as irrelevant. That doesn't mean it's
not there for a given document, but it may mean that a re-transmission of
the same document would be allowed to use a different order without
changing the information.

This property applies to pretty much all structured data formats and not
just XML, by the way, also to CSV and other tabular formats.

Stefan

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) kbtyo <ahlusar.ahluwalia@gmail.com> - 2015-06-25 11:39 -0700
  Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Denis McMahon <denismfmcmahon@gmail.com> - 2015-06-26 07:44 +0000
    Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Stefan Behnel <stefan_ml@behnel.de> - 2015-06-28 09:46 +0200
      Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Denis McMahon <denismfmcmahon@gmail.com> - 2015-06-28 21:00 +0000
        Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Ned Batchelder <ned@nedbatchelder.com> - 2015-06-28 17:07 -0700
          Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Denis McMahon <denismfmcmahon@gmail.com> - 2015-06-30 00:54 +0000
            Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Robert Kern <robert.kern@gmail.com> - 2015-06-30 10:16 +0100
              Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Marko Rauhamaa <marko@pacujo.net> - 2015-06-30 19:32 +0300
        Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Robert Kern <robert.kern@gmail.com> - 2015-06-29 14:04 +0100
      Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Sahlusar <sahluwalia@wynyardgroup.com> - 2015-06-29 07:52 -0700
        Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-06-29 21:26 -0400
        Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header) Chris Angelico <rosuav@gmail.com> - 2015-06-30 22:40 +1000

csiph-web