David said:
I've got some pre-formatted text and I'm not sure how to encode it in
my xml to preserve its formatting. Any help would be appreciated!
How is the formatting currently recorded?
If by "pre-formatted" you mean it contains spaces and tabs and
line-breaks -- that's no problem; basic XML considers all of that
meaningful content and will retain it. Individual XML applications may
discard some of this whitespace, perhaps based on schema and perhaps
based simply on their understanding of how that particular kind of XML
document should be interpreted... but that's a matter of how the XML is
used, not what it contains.
Exception: Whitespace and line breaks in attribute values will be
normalized. See the XML Recommendation for details.
If a particular tool doesn't retain information you need, it may not be
the right tool for your tasks, or you may not be using it right. To take
a specific example: XHTML, when displayed by a browser, will be
processed as HTML was and most whitespace will be discarded unless it is
in element specifically designed or marked to retain the existing
formatting. But that's the browser's behavior, and conventions of the
use of the XHTML markup, not XML.
If by "pre-formatted" you mean something else, please clarify.