# Flash XML Object Layout Question

**URL:** <https://forum.kirupa.com/t/flash-xml-object-layout-question/170761>\
**Category:** programming\
**Created:** [November 29, 2005, 11:17am UTC](https://forum.kirupa.com/t/flash-xml-object-layout-question/170761 "2005-11-29T11:17:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashCurious](https://avatars.discourse-cdn.com/v4/letter/f/71c47a/32.png) [@FlashCurious](https://forum.kirupa.com/u/FlashCurious)\
**Post date:** [November 29, 2005, 11:17am UTC](https://forum.kirupa.com/t/flash-xml-object-layout-question/170761/1 "2005-11-29T11:17:40Z")

</div>

This is the XML map I need:

```auto

<main>
<chunk title="Title" subtitle="Subtitle" title_y="25" sub_y="70" bul_y="110">
<bullet xray="25" seen="1" cue="2">Bullet 1</bullet>
</chunk>
</main>

```

If I lay out this XML object in Flash:

```auto

function makeXML() {
 chunkXML1 = new XML();
 chunkXML1.contentType = "text/xml";
 
 chunkElement1 = chunkXML1.createElement("main");
 chunkElement2 = chunkXML1.createElement("chunk");
 chunkElement2.attributes.title = title;
 chunkElement2.attributes.subtitle = subtitle;
 chunkElement2.attributes.title_y = title_y;
 chunkElement2.attributes.sub_y = sub_y;
 chunkElement2.attributes.bul_y = bul_y;
 
 chunkElement3 = chunkXML1.createElement("bullet");
 chunkElement3.attributes.xray = xray1;
 chunkElement3.attributes.seen = seen1;
 chunkElement3.attributes.cue = cue1;
 
 chunkElement4 = chunkXML1.createTextNode(con1);
 
 chunkXML1.appendChild(chunkElement4);
 chunkXML1.appendChild(chunkElement3);
 chunkXML1.appendChild(chunkElement2);
 chunkXML1.appendChild(chunkElement1);
}

```

When I trace I get:

```auto

Bullet number 1<bullet cue="0" seen="1" xray="25" /><chunk bul_y="110" sub_y="70" title_y="25" subtitle="Subtitle" title="Title" /><main />

```

Where are the beginning brackets for each element and why are the attributes appearing in the second bracket?

Thank you
