Justin3085's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
31 (0.02 per day)
Joined:
20-December 09
Profile Views:
9,230
Last Active:
User is offline Sep 18 2014 02:12 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Hyundai
Dream Kudos:
0

Latest Visitors

Icon   Justin3085 has not set their status

Posts I've Made

  1. In Topic: Sorting after parsing an XML

    Posted 22 Aug 2014

    A 'very quick' search for YOU found the result. For me, I didn't know what to really search for being a rookie and out of all the results I did look at. Your post is not one I found. So I appreciate your knowledge and Thank you for the information.
  2. In Topic: Sorting after parsing an XML

    Posted 22 Aug 2014

    Sorry, I took it out as I was getting frustrated.
    Here is the code again and an XML clip
    import xml.etree.ElementTree as etree
    import os
    
    #define data file
    data_file = 'ticketsexport.xml'
    	
    xmlD = etree.parse(data_file)
    
    #Loops through all tickets and only prints Last Name and Code number.
    for ticket in xmlD.iter('Ticket'):
    	
    	lname = ticket.find('LastName').text
    	code= ticket.find('Code').text
    	results = [lname, code]
    	results.sort()
    	print results
    	
    
    


    <Tickets>
    
    	<Ticket>
    		<LastName>SMITH</LastName>
    		<Code>12:3-456</Code>
    	</Ticket>
            <Ticket>
    		<LastName>SMITH</LastName>
    		<Code>24:6-987</Code>
    	</Ticket>
    	
    </Tickets
    
    


    Hope I did that right.

My Information

Member Title:
New D.I.C Head
Age:
35 years old
Birthday:
August 25, 1979
Gender:
Location:
New Jersey
Full Name:
Justin
Programming Languages:
Python

Contact Information

E-mail:
Private

Friends

Comments

Justin3085 has no profile comments yet. Why not say hello?