# Html tags in xml

**URL:** <https://forum.kirupa.com/t/html-tags-in-xml/129591>\
**Category:** Uncategorized\
**Created:** [November 25, 2004, 11:31am UTC](https://forum.kirupa.com/t/html-tags-in-xml/129591 "2004-11-25T11:31:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![worfoual](https://avatars.discourse-cdn.com/v4/letter/w/8e7dd6/32.png) [@worfoual](https://forum.kirupa.com/u/worfoual)\
**Post date:** [November 25, 2004, 11:31am UTC](https://forum.kirupa.com/t/html-tags-in-xml/129591/1 "2004-11-25T11:31:11Z")

</div>

I want to use html tags in a xml file. I’ve read almost everything I could find about it but it still doesn’t work (for me).

xml file:

> \<?xml version=“1.0” encoding=“iso-8859-1”?\>  
> \<news\>  
> \<newsNode newsTitle=“Title 1” newsText=“This is the text of the first news. \<B\>Bla bla bla\</B\> \<a href=“[http://www.whatever.com](http://www.whatever.com)”\>click hier\</a\>. Bla bla bla”\>\</newsNode\>  
> \<newsNode newsTitle=“Title 2” newsText=“This is the text of the second news. \<B\>I want this bold\</B\> \<a href=“[http://www.whatever.com](http://www.whatever.com)”\>this has to be a link\</a\>. Bla bla bla”\>\</newsNode\>  
> \</news\>

Actionscript in Flash:

> news\_xml = new XML();  
> news\_xml.onLoad = startnewshow;  
> news\_xml.load(“news.xml” \<[http://www.were-here.com/forum/smilies/wink.gif&gt](http://www.were-here.com/forum/smilies/wink.gif&gt); ;  
> news\_xml.ignoreWhite = true;  
> //  
> // Show the first news and intialize variables  
> function startnewshow(success) {  
> if (success == true) {  
> rootNode = news\_xml.firstChild;  
> totalnews = rootNode.childNodes.length;  
> firstnewsNode = rootNode.firstChild;  
> currentnewsNode = firstnewsNode;  
> currentIndex = 1;  
> updatenews(firstnewsNode);

}  
}  
//  
// Updates the current news with new image and text  
function updatenews(newnewsNode) {  
newsTitle = newnewsNode.attributes.newsTitle;  
newsText = newnewsNode.attributes.newsText;  
targetClip.loadMovie(newsTitle);  
}  
//  
// Event handler for ‘Next news’ button  
next\_btn.onRelease = function() {  
nextnewsNode = currentnewsNode.nextSibling;  
if (nextnewsNode == null) {  
break;  
} else {  
currentIndex++;  
updatenews(nextnewsNode);  
currentnewsNode = nextnewsNode;  
}  
};  
//  
// Event handler for ‘Previous news’ button  
back\_btn.onRelease = function() {  
previousnewsNode = currentnewsNode.previousSibling;  
if (previousnewsNode == null) {  
break;  
} else {  
currentIndex–;  
currentnewsNode = previousnewsNode;  
updatenews(previousnewsNode);  
}  
};

I’ve try many things, but I can’t get it working.  
Can someone help me with this.

worfoual
