# Leaf vs. branch in tree

**URL:** <https://forum.kirupa.com/t/leaf-vs-branch-in-tree/238940>\
**Category:** flash\
**Created:** [September 17, 2007, 11:30am UTC](https://forum.kirupa.com/t/leaf-vs-branch-in-tree/238940 "2007-09-17T11:30:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crapman](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@Crapman](https://forum.kirupa.com/u/Crapman)\
**Post date:** [September 17, 2007, 11:30am UTC](https://forum.kirupa.com/t/leaf-vs-branch-in-tree/238940/1 "2007-09-17T11:30:51Z")

</div>

Hi everybody,  
This is my first post here, so i’m really looking forward to seeing if you guys can help me…!

I have a tree, which is filled with data from an xml file… but in the file I have some empty folders - they are marked with isbranch=“true” in the xml, but the flash tree sees them as leafs…

Is there any way, that I can have them showed as branches in the tree, even though they are empty?

**Here’s my xml:**

```auto

  <?xml version="1.0" encoding="UTF-8" ?> - <node>- <node label="Film trailers" isbranch="true">- <node label="Simpsons" isbranch="true"> <node label="The Simpsons Movie" filename="simps.flv" description="Homer og de andre slår sig løs i denne gale film" /> <node label="Shrek 3" filename="shrek.flv" description="Her er en sjov film..." /> <node label="Shrek 2" filename="hej.flv" description="No description" /> - <node label="Afsnit" isbranch="true"> <node label="Episode 1" filename="episode.flv" description="No description" /> <node label="Episode 2" filename="no_file.flv" description="No description" /> </node>- <node label="Film" isbranch="true"> <node label="Filmen" filename="filmen.flv" description="her er hele filmen" /> </node> </node> </node>- <node label="Reklamefilm" isbranch="true"> <node label="7eleven" isbranch="true" /> <node label="Bacardi" isbranch="true" /> <node label="Burger King" isbranch="true" /> <node label="McDonalds" isbranch="true" /> <node label="Smirnoff" isbranch="true" /> <node label="Tuborg" isbranch="true" /> </node>- <node label="Sjove film" isbranch="true"> <node label="Diverse" isbranch="true" /> - <node label="Jack ***" isbranch="true"> <node label="Johnny Knoxville" isbranch="true" /> </node> <node label="Viva La Bam" isbranch="true" /> </node> </node>

```

**And my actionscript:**

```auto
contenTreeFunc();
 
function contenTreeFunc() {
 // Set up the appearance of the tree and event handlers.
 contentTree.setStyle("fontFamily", "tahoma");
 contentTree.setStyle("fontSize", 10);
 contentTree.setStyle("openEasing", Elastic.easeOut);
 // Load the menu XML.
 var treeNavMenu = this;
 menuXML = new XML();
 menuXML.ignoreWhite = true;
 menuXML.load("xmlfile.xml");
 menuXML.onLoad = function() {
  onMenuLoaded();
 };
}
function onMenuLoaded() {
 contentTree.dataProvider = menuXML.firstChild;
}

```
