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

  • Home
  • SEARCH
  • 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 216483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:34:07+00:00 2026-05-11T18:34:07+00:00

I want to learn how to process XML with namespaces in E4X so basically

  • 0

I want to learn how to process XML with namespaces in E4X so basically here is what I want to learn, say I have some XML like this:

<rdf:RDF 
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns="http://purl.org/rss/1.0/">
    <rdf:item value="5"/>
    <item value="10"/>
</rdf:RDF>

How could I assign <rdf:item/> to a var called rdfItems and <item/> to a var called regItems?

Thanks!

  • 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-05-11T18:34:07+00:00Added an answer on May 11, 2026 at 6:34 pm

    I’m not sure whether this answers the question exactly, but given your scenario, the following code retrieves both values (given the “xml” variable, referenced below, is an XML object containing the snippet of XML code you provided):

    // Your "rdf" namespace
    namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    use namespace rdf;
    
    // Your "reg" (i.e, default) namespace
    namespace reg = "http://purl.org/rss/1.0/";
    use namespace reg;
    
    private function getYourValues():void
    {               
        var rdfitems:String = xml.rdf::item.@value;
        var regitems:String = xml.reg::item.@value;
    }
    

    A distinction needs to be made between the “rdf” item and the “non-rdf” one, since their element names are otherwise identical, so the second namespace is declared to allow you to retrieve each item independently. Hope it helps!

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

Sidebar

Ask A Question

Stats

  • Questions 115k
  • Answers 115k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the urlgrabber library. This includes an HTTP handler for… May 11, 2026 at 10:29 pm
  • Editorial Team
    Editorial Team added an answer Just assign variables like so: var win = window; var… May 11, 2026 at 10:29 pm
  • Editorial Team
    Editorial Team added an answer You can force the port of the test web site… May 11, 2026 at 10:29 pm

Related Questions

I want to scrape the user pages of SO to give the owners of
I have a feature which allows the user to create projects and view it
Platform Builder is a tool for building a Windows CE Operating system on your
Since I've started using NetBeans, I've learned of some powerful ways to abstract away
Alright so I have this C++ image capturing class. I was wondering if I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.