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


Groups > comp.lang.python > #60457

Re: parsing nested unbounded XML fields with ElementTree

References <d75d1f2c-05c6-4fa6-ae0a-28e13de3097a@googlegroups.com>
Date 2013-11-26 09:30 +1100
Subject Re: parsing nested unbounded XML fields with ElementTree
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3197.1385418647.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Nov 26, 2013 at 9:22 AM, Larry.Martell@gmail.com
<Larry.Martell@gmail.com> wrote:
> I have an XML file that has an element called "Node". These can be nested to any depth and the depth of the nesting is not known to me. I need to parse the file and preserve the nesting. For exmaple, if the XML file had:
>
> <Node Name="A">
>    <Node Name="B">
>       <Node Name="C">
>         <Node Name="D">
>           <Node Name="E">

First off, please clarify: Are there five corresponding </Node> tags
later on? If not, it's not XML, and nesting will have to be defined
some other way.

Secondly, please get off Google Groups. Your initial post is
malformed, and unless you specifically fight the software, your
replies will be even more malformed, to the point of being quite
annoying. There are many other ways to read a newsgroup, or you can
subscribe to the mailing list python-list@python.org, which carries
the same content.

ChrisA

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


Thread

parsing nested unbounded XML fields with ElementTree "Larry.Martell@gmail.com" <Larry.Martell@gmail.com> - 2013-11-25 14:22 -0800
  Re: parsing nested unbounded XML fields with ElementTree Chris Angelico <rosuav@gmail.com> - 2013-11-26 09:30 +1100
  Re: parsing nested unbounded XML fields with ElementTree Stefan Behnel <stefan_ml@behnel.de> - 2013-11-26 08:38 +0100
  Re: parsing nested unbounded XML fields with ElementTree Larry Martell <larry.martell@gmail.com> - 2013-11-26 07:23 -0500
  Re: parsing nested unbounded XML fields with ElementTree Stefan Behnel <stefan_ml@behnel.de> - 2013-11-26 14:20 +0100
  Re: parsing nested unbounded XML fields with ElementTree Neil Cerutti <mr.cerutti@gmail.com> - 2013-11-26 10:27 -0500
  Re: parsing nested unbounded XML fields with ElementTree Larry Martell <larry.martell@gmail.com> - 2013-11-27 09:58 -0500

csiph-web