What is a node?

Discussion in 'Android General Discussions' started by droid15, Aug 6, 2010.

  1. droid15

    droid15 Member

    Joined:
    May 29, 2010
    Messages:
    166
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    I am doing this tutorial but can't figure out what a node is... Don't give me a link to google because if an easy enough explanation was on Google when I searched it then I wouldn't be making this thread.
     
  2. SixStringTheory

    Joined:
    Jun 25, 2010
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Well depending on context it can be anything.

    Buuut since he's talking about .xml files, specifically strings.xml it's everything in the xml document... anything in a .xml is a node, and is a node of another node, etc... just a big tree of nodes. Just like trees have branches with other branches on them that have branches coming out of them, xml has nodes with nodes inside nodes inside other nodes.

    So in that xml document you have

    <Resources>
    ....
    </resources>

    That whole thing is a node. But in that node you have some
    <string>...</string>
    each one of those is a node.

    So in the resources node there's 3 string nodes.

    Make sense? If not..

    Code:
    <node 1>
        <node 2>.....</node 2>
        <node 3>.....</node 3>
    </node 1>
    
    should make more sense.
     
    #2 SixStringTheory, Aug 6, 2010
    Last edited: Aug 6, 2010