Does anybody have any thoughts on a good way to include html formatting in a block of xml data? I have a system for loading the text into the browser that works as follows (note this is not specific, only a pseudocode example):
XML FILE:
<xmlBlock>This text will be stored in an array variable and echoed into the browser.</xmlBlock>
<xmlBlock>This text will alse be stored in an array variable and echoed into the browser.</xmlBlock>
<xmlBlock>This text, as well as the previous two lines, will be stored in an array variable and echoed into the browser.</xmlBlock>
END XML FILE
PHP PSEUDOCODE:
When <xmlBlock> is encountered, store $data into $dataArray[$counter];
for loop through $dataArray {
$html .= '<p>' . $dataArray[$current] . '</p>'
}
HTML PSEUDOCODE:
<body>
<? echo $html ?>
</body>
The result being that each XML block gets put into a new <p> block in the browser. Simple, decently effective.
Except that html code inside the XML datablock makes it very angry. Are there any tutorials that cover how to do this, or perhaps a better way to do it? Mucho thanks! :toad: