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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:45:47+00:00 2026-05-23T02:45:47+00:00

Suppose I have an XML <xml> <lang>en</lang> <en> <text id=123>One Two Three</text> <text id=hello>Hello</text>

  • 0

Suppose I have an XML

<xml>

<lang>en</lang>
<en>
    <text id="123">One Two Three</text>
    <text id="hello">Hello</text>
</en>

</xml>

the “en” tag is only if the lang value is “en”.
If the value of lang is “de”

<lang>de</lang>
<de>
        <text id="123">One Two Three</text>
        <text id="hello">Hello</text>
</de>

How do I get this name dinamicaly in my actionscript 3 code.

Suppose I want to use

var xmlVal = new XML(... the above xml)
var lang = xmlVal.lang;

I can’t use if (xmlVal.lang == “en”) .. because the lang value can be any string. but there should be a child node in that name..!!

How do I get values from node “en or de or what ever..” ??

  • 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-23T02:45:48+00:00Added an answer on May 23, 2026 at 2:45 am

    Haven’t tested, but this should give you the general idea (that you can dynamically select using the “key”):

    var xmlVal:XML = new XML(... the above xml);
    
    var type:String = xmlVal.lang;
    
    var result:XML = xmlVal[type];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have XML like this: <child_metadata> <metadata> <attributes> <metadata_key value=include/> <metadata_value value=value1/> </attributes>
Suppose I have xml like this: <Products> <Product name=Liquid Oxygen> <Manufacturer name=Universal Exports country=UK
Suppose I have XML like this: <xsl:template match=assessment | section > . . .
Suppose i have an xml document like this XML File: <document> <educationalsection> educational details
Suppose I have 2 XML files and my activity will setContentView the appropriate one
Suppose i have an XML file, that i use as local database, like this):
I have the following XSLT question: Suppose I have this XML <items> <item> <type>dog</type>
Suppose i have one customer class and i will serialize the class to xml
I have a simple layout like below (which only shows a text TEST): <?xml
Suppose I have a stringbuilder in C# that does this: StringBuilder sb = new

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.