Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8105773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:15:18+00:00 2026-06-06T00:15:18+00:00

i have an xml output from a webservice in a variable results it looks

  • 0

i have an xml output from a webservice in a variable “results”

it looks something like this,

<ArrayOfSeriesRecord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns="http://hiscentral.cuahsi.org/20100205/">

<SeriesRecord>
<ServCode>IIHRTippingB</ServCode>
<ServURL>
http://his08.iihr.uiowa.edu/tippingbucket/cuahsi_1_0.asmx?WSDL
</ServURL>
<location>IIHR:CC00</location>
<VarCode>IIHR:Precipitation</VarCode>
<VarName>Precipitation</VarName>
<beginDate>9/25/2006 12:00:00 AM</beginDate>
<endDate>5/7/2011 12:00:00 AM</endDate>
<ValueCount>161738</ValueCount>
<Sitename>CC00</Sitename>
<latitude>41.736152648925781</latitude>
<longitude>-91.931015014648438</longitude>
<datatype>Continuous</datatype>
<valuetype>FieldObservation</valuetype>
<samplemedium>Precipitation</samplemedium>
<timeunits>minute</timeunits>
<conceptKeyword>Precipitation</conceptKeyword>
<genCategory/>
<TimeSupport>15</TimeSupport>
</SeriesRecord>

i need to parse this xml to get the latitude and longitude and plot it on google maps..

any idea how i can do that..
please help

thanx in advance.. :))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T00:15:25+00:00Added an answer on June 6, 2026 at 12:15 am

    My favorite method for parsing xml is to use JAXB. You need an XML Schema Definition file that lays out how the XML will be structured. Then you use JAXB to generate Java classes that represent the elements. Then you can Marshal and Unmarshal XML/Data into and out of those objects.

    //Read an XML file (or string, stream, etc...) into Java classes
    JAXBContext context = JAXBContext.newInstance("org.my.jaxb.classes");
    Unmarshaller unmarshaller = context.createUnmarshaller();
    
    JAXBElement<ArrayOfSeriesRecord> rootJaxb = (JAXBElement<ArrayOfSeriesRecord>)unmarshaller.unmarshal(new File("file.xml"));
    ArrayOfSeriesRecord root = rootJaxb.getValue();
    List<SeriesRecord> seriesRecords = root.getSeriesRecord();
    

    Example of the XSD

    //Example xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:element name="ArrayOfSeriesRecord" type="ArrayOfSeriesRecordType"></xsd:element>
    
        <xsd:complexType name="ArrayOfSeriesRecordType">
            <xsd:sequence>
                <xsd:element name="SeriesRecord" type="SeriesRecordType" maxOccurs="unbounded"></xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    
        <xsd:complexType name="SeriesRecordType">
            <xsd:sequence>
                <xsd:element name="ServCode" type="xsd:string"></xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:schema>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have XML that looks like this: <Parameter Name=parameter name Value=parameter value /> which
I have XML that looks like this: <ROW ref=0005631 type=04 line=1 value=Australia/> <ROW ref=0005631
I have an XML that looks like this <Labs> <Lab id=a name=a> <Test name=aa></Test>
I am currently watching an XML file from log4j output. I have a custom
I have xml like this: <configurationData> <path name='b'> <path name='a'> <setting name='s1'> ![CDATA[XXXX]] </setting>
I have a quite big XML output from an application. I need to process
I have created a simple method to retrieve XML output from an HTTPService and
I'm trying to parse an xml file output from googletest to display the results
I have an XML string which is output from a Visual Fox Pro based
I have a webservice webmethod which saves the xml output to destination [WebMethod] [ScriptMethod(ResponseFormat

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.