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 9096025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:44:55+00:00 2026-06-16T23:44:55+00:00

I have this xml file that i want to get values from : <test>

  • 0

I have this xml file that i want to get values from :

  <test> 
        <item>
            <question audio='audio/AB2001Q.mp3' category='Alertness'>Before you make a U-turn in the road, you should</question>
            <description audio='audio/s1,1.mp3'>If you want to make a U-turn, slow down and ensure that the road is clear in both directions. Make sure that the road is wide enough to carry out the manoeuvre safely.</description>
            <image ></image>
            <answers>
                <answer title='a' audio='audio/AB2001A.mp3'>give an arm signal as well as using your indicators</answer>
                <answer title='b' audio='audio/AB2001B.mp3'>signal so that other drivers can slow down for you</answer>
                <answer title='c' audio='audio/AB2001C.mp3'>look over your shoulder for a final check</answer>
                <answer title='d' audio='audio/AB2001D.mp3'>select a higher gear than normal</answer>
            </answers>
            <correctAnswers>
                <answer>c</answer>
            </correctAnswers>
        </item>
 </test>

How can I get the text content of question audio and the question text so for example

“audio/AB2001Q.mp3” is the question audio

“Before you make a U-turn in the road, you should” is the question text

this is what i have so far:

var doc = Ti.XML.parseString(blob);
var branch = doc.getElementsByTagName('item').item(0);

I am very new to xml!

  • 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-16T23:44:56+00:00Added an answer on June 16, 2026 at 11:44 pm

    It’s similarly to what you’d do in HTML, e.g.:

    var branch = doc.getElementsByTagName('item')[0];
    var question = branch.getElementsByTagName('question')[0];
    var q1Text = question.childNodes[0].nodeValue;
    var q1Audio = question.getAttribute['audio'];
    

    (it would be a bit easier if you’d use jQuery, Sencha or any other library)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code that reads from XML file. It gets five strings (groupId,
I have this test code that just saves an XML file to a folder.
helo, i want to read values from this file: http://www.nbp.pl/kursy/xml/lastC.xml and fill grid with
In my values.xml file, I have an array, like this; <string-array name=animals-array> <item>Cow</item> <item>Pig</item>
I have a XML file template like this that comes from some IC chips,
I have an XML file that reads like this <abc> <ab>value</ab> <aa>time</aa> <ac>money</ac> </abc>
I have an XML file that looks like this: <SiteMenuItems> <SiteMenuItem text=Home navigateurl=/Default.aspx tooltip=Return
I have an xml file that contains a structure.. In this structure, I have
I have a large xml file that looks like this: 20120124 07:30:15.301, saving to
--edited for clarity (hopefully) I have an XML file that looks something like this:

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.