I'd like to use XML to store the content for a journaling program, but it's pretty drab. I don't have any problem generating the XML or using it with an XSL template. The issue I'm having is that I would like the user to be able to use simple formatting like bold and italics within a journal entry. For example (XML):
Code:
<journal>
<note>
<date>03/29/2007</date>
<entry>Here is an entry in my journal</entry>
</note>
</journal>
I can format the whole <entry> as usual, but how can I get XML to recognize that one of the words within the <entry> should be bold?
I have no problem doing string replacement stuff, however I've not been able to implement any that work. I can Javascript it, replacing < with <, for example. This invalidates the XML code (no < allowed), but even when it's in there, and I can see it in the code, the browser will not render is as bold ... it just ignores it.
Code:
<journal>
<note>
<date>03/29/2007</date>
<entry>Here is an <b>entry</b> in my journal</entry>
</note>
</journal>
ends up as
Code:
03/29/2007
Here is an entry in my journal
I'm having a similar problem with line breaks within an entry ... <br /> just shows up without breaking the line, and actual carriage returns within an entry are ignored.
How can I get HTML instructions to render within an XML element?
Thoughts? Thanks in advance ...