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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:13:29+00:00 2026-05-16T15:13:29+00:00

I am faced with a small project now,in which I have to present a

  • 0

I am faced with a small project now,in which I have to present a peoridic table to the user.However,it is bit more complicated than just a pure peoridic table image file.Let me break it down a bit:

1.In the same folder,there is an xml file,which have the following format:

<constraints>
<element>
 <name>Calcium</name>
 <abbreviation>Ca</abbreviation>
 <emissions>
  <wavelength>118</wavelength>
 </emissions>
 <standards>
  <concentration>0.01</concentration>
  <concentration>0.1</concentration>
 </standards>
</element>

it basically just specifies what elements should be highlighted in the peoridic table.So after reading from this xml file,our peoridic table should be reflected by making these elements yellow and clickable while leaving others grey and not-clickable.But only the name attribute is what I needed.

2.Secondly,it just needs to make sure that the elements on the periodic table elements that have been specified by the xml file should be enabled for clicking by the user.

Since I am bit new to Flex programming,now two things concern me most.The first is how to do the xml parsing in FLEX?I did this parsing in C#,but have no idea how to do this.
Secondly,how should I depict the periodic table?I should make elements clickable.
Thirdly,how should I make the periodic table be aware of the elements that have been parsed out from the xml file,i.e,where should I store these extracted elements?

Sounds bit tough,I just need some ideas or maybe some code to help me start,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-16T15:13:30+00:00Added an answer on May 16, 2026 at 3:13 pm

    XML parsing is pretty easy in actionscript 3 with E4X and somewhat similar to C#.

    e.g.

    var table:XML = <constraints>
    <element>
     <name>Calcium</name>
     <abbreviation>Ca</abbreviation>
     <emissions>
      <wavelength>118</wavelength>
     </emissions>
     <standards>
      <concentration>0.01</concentration>
      <concentration>0.1</concentration>
     </standards>
    </element>
    </constraints>
    trace(table.element.name);
    

    Do checkout the E4X tutorial on the Yahoo Developer Network to get started easily. The rest should be easy enough.

    For point 2 you should just loop through the element names and then enable their view/visual asset equivalent.

    e.g.

    for each (var element:XML in table.element.*) trace(element.name);//enable here instead of tracing
    

    Update

    I had a bit of fun with the great libspark SvgParser and the wikipedia periodic table svg.
    This is NOT how anyone should write code, this is just a quick and dirty test.

    You can view the test here and the source here.

    here’s a preview:
    flex 3 periodic table test

    Also displaying the C# version of parsing would help.
    And I found another great E4X article.

    HTH,
    George

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

Sidebar

Related Questions

I have been developing a small project meant to run under weblogic 8.1. Richfaces
Faced with the challenge of a new application with which you had free reign
I have faced this problem quite often during the last couple of months, during
I am currently faced with a difficult sorting problem. I have a collection of
We have recently been faced with the problem of porting our C++ framework to
We have a project that uses HP Quality Center and one of the regular
From the moment I have faced Python, the only thing I can say for
I'm faced with a design decision that doesn't smell to me, but gives me
I faced a little trouble - I do not know if I can define
I'm faced with writing a framework to simplify working with a large and complex

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.