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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:21:12+00:00 2026-06-11T02:21:12+00:00

I have an xml file with a structure like this <display> <service> <URL></URL> <name></name>

  • 0

I have an xml file with a structure like this

    <display>
     <service>
      <URL></URL>
       <name></name>
       <LayerGroups>
         <id></id>
         <fields>
          <field>
            <attribute>object</attribute>
            <alias>OBJECT</alias>
          </field>
          <field>
            <attribute>name</attribute>
            <alias>NAME</alias>
          </field>
        <fields>
      </LayerGroup>
     </service>
    </display>  

I would like to know how I can reference each individual attribute. I imagine it would be something along the lines of _______.display.service.LayerGroups.fields.field.attribute, but there are two “field” and two “attribute”. How do I make the distinction?

  • 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-11T02:21:14+00:00Added an answer on June 11, 2026 at 2:21 am

    I believe you’d reference the parent with an index, so in your case it would be

    _______.display.service.LayerGroups.fields.field[0].attribute,
    

    for the first one, and

    _______.display.service.LayerGroups.fields.field[1].attribute,
    

    for the second one.

    When accessing XML, if there are more than one tags of the same name, you’d use an index at the end of the tag within action script. The first in a collection of tags with the same name would be [0], incrementing by one for each subsequent tag with that name. This is assuming that all tags are on the same level within the XML document structure.

    See this

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

Sidebar

Related Questions

I have an xml mapping file that looks something like this <colourMappings> <model name=modelX>
I have an xml file nodes structure like this <Employee> <EmpId></EmpId> <EmpName></EmpName> <Salary> <Basic></Basic>
I have an xml file that contains a structure.. In this structure, I have
I have an XML file that looks like this: <?xml version=1.0? encoding=UTF-8 standalone=no?> <dir
I have an XML structure that looks like this: <root> <index> <item>item 1</item> <item>item
I have an XML file with this structure: <?xml version=1.0 encoding=utf-8 ?> <Photobank> <Landowner
I have XML file (output of some application) like this: <data> <call function=get_user_data> <output>
I have an xml file with following structure: <table name=tblcats> <row> <Id>3680</Id> <Industry>Associations</Industry> <ParentId>1810</ParentId>
I have an xml file that contains in products. File's structure this: <?xml version=1.0
I have an XML file, like <stock><name>AXL</name><time>19-07</time><price>11.34</price></stock> <stock><name>AIK</name><time>19-07</time><price>13.54</price></stock> <stock><name>ALO</name><time>19-07</time><price>16.32</price></stock> <stock><name>APO</name><time>19-07</time><price>13.56</price></stock> ...............more How can I

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.