[XML-DEV Mailing List Archive Home]
[Reply To This Message]
RE: embedded html
Title: embedded html
i understand well,
to parse the text to a new document (using (Document)saxbuilder.build(String
text)) and get the node of this document and put this node in the other
document(original one) between the <BODYTEXT> tags...
You can use whatever containing tag you want (if your DTD allows that).
The main point is: do not add the markup
as text. Instead, *parse* it, and add the resulting JDOM
you mean, putting all the text between
<P> and </P>?
Don't the <P> have to be declared in the dtd
and what's the difference with putting it between <BODYTEXT>
if you wan't your XML processor to treat the HTML as markup, not as
text, you'll have to *tell* it that it's markup. So,
a) wrap the text into a container tag like
b) parse the string into a JDOM
c) move all child nodes to your BODYTEXT
Forgot to tell that i was using xmlOutputter
and that in our dtd, these <a> elements
are declared, so no validation faults are given...
we just add all elements to the document
structure, except this one (included in the text) but is a valid xml
on one of my projects, i'm working with
Jdom (old version jan. 2000) to parse xml (when validating)
If i want to use html tags between xml
tags, the tags are replaced by "<" or ">"...
<BODYTEXT>this is just text with a
link<a href="link.html">text for link</a>text goes
the text between the bodytext is just text,
coming right out of the database. When getting the text from the
database, everything is just fine but when adding this text to the
document (while constructing the doc) and parsing it we get the "<"
signs replaced by "<" etc.
How do i avoid the replacing of these tags
without having to extract the link data of the text and putting it
between xml tags?
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please