parsing XML within HTML files

Arnold, Curt Curt.Arnold at hyprotech.com
Fri Sep 4 01:37:09 BST 1998


"Presenting XML" by Light discusses how to write HTML so that it is also
valid XML.  Basically you have to do things like explicitly close your
paragraphs, i.e.

<p>
This is a paragraph.  The following close paragraph tag is legal HTML
(and required for it to be legal XML) but no HTML authoring tool would
ever add it.
</p> 

If that is tolerable, you could insert you special tags within the
document that you replace.

<p>
This is a <subst src="url of source">replace this</subst>
</p>

You wouldn't need to have a HTML DTD (but you could if you wanted).

However, given all that, if you aren't interested in extracting any
meaning from the XML (like the URL in the same), It would seem easier to
take the approach Microsoft did with VB 6 and just use a DIV tag within
your normal HTML stream and have your servlet scan and replace the
"<DIV></DIV>" blocks it recognizes.

<p>This is a <DIV ID="REPLACEMENT1"></DIV>



-----Original Message-----
From: Weihong Xie [mailto:wxie at gmswireless.com]
Sent: Thursday, September 03, 1998 4:18 PM
To: Xml-Dev
Subject: parsing XML within HTML files


I posted this before and was returned by mail failure. Sorry if
duplicated.

------------------------------------------------------------------------
----
--
hi,

I am developing some servlet application and am looking at XML to see if
I
can use it to present dynamic information.

AlL I want to do is in normal HTML files, there will be some customized
XML
tags to mark the places where dynamic values will be inserted, so when
the
servlet serves those pages, it will provide those values but leave the
HTML
text alone. The question is how I can do this, do I need a DTD that
defines
HTML and my customized tags or is there any XML parsers understand HTML?
I
am new to XML, so any advice is welcome.

Thanks.

Weihong.


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list