how to store these values into the xml

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaleeswaran
    New Member
    • Mar 2007
    • 132

    #1

    how to store these values into the xml

    hi!
    i was attend one interview..almo st i completed all my interview rounds.
    now they given a task for final thing.
    This is my task:
    The Project should only consists of *.html,*.css,*. js,*.xml.
    so ,i decided to store my data into xml file ...and i am going to display the data's into the html page.
    now my concept is this:
    i have contact list inside that i have Friends,Family, Workers.
    Each list i have First Name and Last Name.
    so these data's are i have to display in Tree Structure Format into the html file..
    when the user Clicks the Friends ,Family,Workers folder Should close and hides contact within it.
    for eg:
    when the user clicks the Friends Folder the name List should display like this:

    -contact
    -Friends
    -Jean-Louis Durant
    -Rene Norega
    +Family
    +Work

    so ,
    when the User Clicks Jean-Louis Durant then Two Text Fields are there In My HTML Page so First Name and Last Name display respectively.

    like first Name:Jean-Louis
    Last Name:Durant.
    That's it.
    Hope you all understand my situtation.
    how to store into the xml file...means what is the structure.pleas e give me some solution.
    Thank you,
    Kaleeswaran
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    the XML structure you want is what you already descibed:
    1. list
    2. contact
    3.a Friends
    3.b Family
    3.c Workers
    4.a First Name
    4.b Last Name

    or put into XML:
    Code:
    <list>
      <contact>
        <friends>
          <person>
            <firstname>
            <lastname>
          </person>
    ...
        </friends>
        <family>
    ...
        </family>
        <workers>
    ...
        </workers>
      </contact>
    ...
    </list>

    Comment

    Working...