troubleshooting Question

Use Java to Parse XML for Specific Element

Avatar of cgray1223
cgray1223 asked on
JavaJava EE
9 Comments2 Solutions266 ViewsLast Modified:
Hello,

I'm receiving the below xml response and I need to parse so that all I get is Collection of the URL128 xml Element values.  Any ideas on the most efficient way to accomplish this?

 

     
 <?xml version="1.0" encoding="utf-8"?>
        <imagesXML>
        	<Images>
        		<Image>
        			<ImageUID Scope="Public" Type="Guid" Value="{7f2535d0-9a41-4997-9694-0a4de569e6d9}"/>
        			<CorbisID Scope="Public" Type="String" Value="42-15534232"/>
        			<Title Scope="Public" Type="String" Value="Animal"/>
        			<CreditLine Scope="Public" Type="String" Value="© Robert Llewellyn/Corbis"/>
        			<IsRoyaltyFree Scope="Public" Type="Boolean" Value="False"/><AspectRatio Scope="Public" Type="String" Value="1.500000"/>
        			<URL128 Scope="Public" Type="String" Value="http://cachens.corbis.com/CorbisImage/thumb/15/53/42/15534232/42-15534232.jpg"/>
        		</Image>
                <Image>
        			<ImageUID Scope="Public" Type="Guid" Value="{7f2535d0-9a41-4997-9694-0a4de569e6d9}"/>
        			<CorbisID Scope="Public" Type="String" Value="42-15534232"/>
        			<Title Scope="Public" Type="String" Value="Animal"/>
        			<CreditLine Scope="Public" Type="String" Value="© Robert Llewellyn/Corbis"/>
        			<IsRoyaltyFree Scope="Public" Type="Boolean" Value="False"/><AspectRatio Scope="Public" Type="String" Value="1.500000"/>
        			<URL128 Scope="Public" Type="String" Value="http://cachens.corbis.com/CorbisImage/thumb/15/53/42/15534232/42-15534232.jpg"/>
        		</Image>
        	</Images>
        </imagesXML>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros