Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'output': 0.05; 'attribute': 0.07; 'list?': 0.07; 'append': 0.09; 'dan': 0.09; 'parsing': 0.09; 'subject:xml': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'posted': 0.15; 'bit.': 0.16; 'cc:name:python list': 0.16; 'fetch': 0.16; 'order?': 0.16; 'sequential': 0.16; 'files.': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'wed,': 0.18; 'trying': 0.19; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'this?': 0.23; '31,': 0.24; 'merge': 0.24; 'module,': 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; 'reply.': 0.31; 'anyone': 0.31; 'file': 0.32; 'this.': 0.32; 'probably': 0.32; 'quite': 0.32; 'could': 0.34; 'received:google.com': 0.35; 'there': 0.35; 'done': 0.36; 'thanks': 0.36; 'hi,': 0.36; 'two': 0.37; 'list.': 0.37; 'mailing': 0.39; 'how': 0.40; 'read': 0.60; 'liked': 0.60; 'tell': 0.60; 'tag': 0.61; "you're": 0.61; 'different': 0.65; '30,': 0.65; 'to:addr:gmail.com': 0.65; 'jul': 0.74; 'br,': 0.84; '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=gCYWiUDDc1aE9eKed/zLtYdcVHAVRNDA1/upjqSy+EY=; b=fOyGeMZQ/BSOGbH/S2EZ8/u7i72B/akswap826qWRTkp4qsSmD5Us6SbbgvIECU492 tm2mP37s5ZyGwIVsRaEIQ6Zvwh5kXjqCXb0RTJl5JfO8adAtOkKAvpL2skqFt9qXp7Xl D33o7iBqbqvY4Sp485/JEej1lLWNYGx4ndwTZyW/3QErhNxGPNbDxJU9JD80olqgLBKQ hvkwUm5BCNDvBSY8N+8JVvTtH77FqJJMF9+VOO52DsxvlcS3644EkrF8JDL5Li1F9kRo WIV+rhYgfEkd2NRY/Ar9Gaot+mLyxJ1ixGqZXTPp6ZpM65bmwwrYpdN5txQZiYeru+ac 33Dw== MIME-Version: 1.0 X-Received: by 10.236.23.70 with SMTP id u46mr3469090yhu.13.1406861294581; Thu, 31 Jul 2014 19:48:14 -0700 (PDT) In-Reply-To: References: Date: Thu, 31 Jul 2014 19:48:14 -0700 Subject: Re: How to loop through nodes of xml through xslt From: Dan Stromberg To: varun bhatnagar Content-Type: text/plain; charset=UTF-8 Cc: Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406861302 news.xs4all.nl 2860 [2001:888:2000:d::a6]:49680 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75454 You're probably still better off finding an XSLT mailing list. On Thu, Jul 31, 2014 at 12:31 AM, varun bhatnagar wrote: > Hi Dan, > > Thanks a lot for the reply. I am using lxml for the transformation and I am > parsing xsl file using lxml module, that is why posted in this list. > Is there any way out to achieve this? > > Thanks, > BR, > Varun > > > On Thu, Jul 31, 2014 at 5:47 AM, Dan Stromberg wrote: >> >> On Wed, Jul 30, 2014 at 5:16 AM, varun bhatnagar >> 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 () 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 > >