# XML in flash question

**URL:** <https://forum.kirupa.com/t/xml-in-flash-question/229024>\
**Category:** flash\
**Created:** [June 13, 2007, 2:13pm UTC](https://forum.kirupa.com/t/xml-in-flash-question/229024 "2007-06-13T14:13:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![p\_ziity](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@p\_ziity](https://forum.kirupa.com/u/p_ziity)\
**Post date:** [June 13, 2007, 2:13pm UTC](https://forum.kirupa.com/t/xml-in-flash-question/229024/1 "2007-06-13T14:13:04Z")

</div>

I recently found this tutorial on integrating xml in flash and I can not figure out how to bold things. I know that \<b\> and \<STRONG\> will bold things but, when I enter type in either syntex in my XML document I get “null” replacing the sentence I need bolded. Below is my Flash and XML script I pieced together, if you could please show me how to bold the words you would be forever awesome.

Thanks,  
Zach

//MY XML

\<broadcast\>  
\<story\>  
\<body\>\<STRONG\> I Would like to bold this text \</STRONG\> but this part I want to remain unbold\</body\>\</story\>  
\</broadcast\>

//MY FLASH

headlineXML = new XML();  
/\*  
With the XML Object now active you must now load an XML foramtted document.  
Any DTD or XLS formatting will be ignored.  
\*/  
headlineXML.onLoad = myLoad;  
headlineXML.load(“cases.xml”);  
function myLoad(ok) {  
if (ok == true) {  
Publish(this.firstChild);  
}  
}  
function Publish(HeadlineXMLNode) {  
if (HeadlineXMLNode.nodeName.toUpperCase() == “BROADCAST”) {  
content = “”;  
story = HeadlineXMLNode.firstChild;  
while (story != null) {  
if (story.nodeName.toUpperCase() == “STORY”) {  
lead = “”;  
body = “”;  
URL = “”;  
b = “”;  
element = story.firstChild;  
while (element != null) {  
if (element.nodeName.toUpperCase() == “LEAD”) {  
lead = element.firstChild.nodeValue;  
}  
if (element.nodeName.toUpperCase() == “BODY”) {  
body = element.firstChild.nodeValue;  
}  
if (element.nodeName.toUpperCase() == “URL”) {  
URL = element.firstChild.nodeValue;  
}

```
                element = element.nextSibling;
            }

```

content += “\<font size=’+1’ color=’#3366cc’\>\<a href=’”+URL+"’\>"+lead+"\</a\>\</font\>"+body+"\<br\>";  
scroller.htmltext = content;  
}  
story = story.nextSibling;  
}  
}  
}  
 ![](http://forum.kirupa.com/uploads/kirupa/3755/3aec295217693272.gif)[![](http://forum.kirupa.com/uploads/kirupa/3756/20ace7f93c5339be.gif)](http://www.actionscript.org/forums/newreply.php3?do=newreply&p=619675)
