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


Groups > comp.lang.python > #75399

Re: How to loop through nodes of xml through xslt

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <drsalists@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'output': 0.05; 'attribute': 0.07; 'list?': 0.07; 'append': 0.09; 'subject:xml': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'bit.': 0.16; 'cc:name:python list': 0.16; 'fetch': 0.16; 'order?': 0.16; 'sequential': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'trying': 0.19; 'cc:addr:python.org': 0.22; 'merge': 0.24; 'looks': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'xml': 0.29; 'message-id:@mail.gmail.com': 0.30; 'anyone': 0.31; 'file': 0.32; 'this.': 0.32; 'quite': 0.32; 'could': 0.34; 'received:google.com': 0.35; 'done': 0.36; 'hi,': 0.36; 'two': 0.37; 'mailing': 0.39; 'how': 0.40; 'read': 0.60; 'liked': 0.60; 'tell': 0.60; 'tag': 0.61; 'different': 0.65; '30,': 0.65; 'to:addr:gmail.com': 0.65; 'jul': 0.74; 'xslt': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mqFOsvjmQ9RknAWmP7eDfJ3OLPKqiAZ4obOu+/FR5Kc=; b=fjbZ6nmhniO0FbjAuga4bYYzWCb5dr5Vf83YHoEmkTGUVNs3cQb+lEMF2jpMsUe6q6 dEdSk/sn8FSI7TBcKAJE3q82iigpmkGHHb7QKjoewapXQFGRnk2wCB+7tmRZQdf4M8Bo LUDITUo45kz1lbaiJWioNvwiID3gFN+8ckN6UXoIShU1dZ5CvRyPuNoYfo80UtgpAi3l ATl/VsWl0wolWuTmXuS3faJt86GCNZdlCgRmJtceiJza61rbSJAYpuM9URIKtQyvayfd HAiatnf1/k0knN+t+xIYARuR5dXgtofrYR7sTeAxMcK7jER9ZpTqqQmGDr6ZOx1kbJEC /eBQ==
MIME-Version 1.0
X-Received by 10.236.206.115 with SMTP id k79mr2100902yho.1.1406778446943; Wed, 30 Jul 2014 20:47:26 -0700 (PDT)
In-Reply-To <CAGxOggHnagZzXxCTCs9ZKxrwKV0oDcDXykOw6izDZS8MOubVtA@mail.gmail.com>
References <CAGxOggHnagZzXxCTCs9ZKxrwKV0oDcDXykOw6izDZS8MOubVtA@mail.gmail.com>
Date Wed, 30 Jul 2014 20:47:26 -0700
Subject Re: How to loop through nodes of xml through xslt
From Dan Stromberg <drsalists@gmail.com>
To varun bhatnagar <varun292006@gmail.com>
Content-Type text/plain; charset=UTF-8
Cc Python List <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.12453.1406778455.18130.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1406778455 news.xs4all.nl 2860 [2001:888:2000:d::a6]:37262
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75399

Show key headers only | View raw


On Wed, Jul 30, 2014 at 5:16 AM, varun bhatnagar <varun292006@gmail.com> wrote:
> Hi,
>
> I have two xml files.

> I am trying to fetch an output file which looks like this:
>
> Output.xml

> The number of Procedure tag (<Procedure>) can be different every time. So I
> have to read this tag every time from each xml and then merge it
> sequentially.
> Can anyone tell me how to achieve this. How can I loop every Procedure tag
> and and append the attrProc attribute value in a sequential order?

Did you mean to send this to an XSLT mailing list?  You came through
on the python-list.

If you want to make this about Python, you could try xmltodict or
lxml.  I've done two projects with xmltodict recently, and liked it
quite a bit.

HTH

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


Thread

Re: How to loop through nodes of xml through xslt Dan Stromberg <drsalists@gmail.com> - 2014-07-30 20:47 -0700

csiph-web