Re: NEED HELP, WANT TO HAVE XML TAGS AND COLOR
"Holk, David A" <[email protected]> Mon, 23 Jun 2003 10:12:25 -0400
| Newsgroups | gmane.comp.java.sun.xml.general |
|---|---|
| Message-ID | <[email protected]> |
<?xml version="1.0" ?> The short answer is that XML is intended to contain data and not present it. If you want to display XML data in a web browser, you would normally use XSLT to extract the data and put HTML tags around it for formatting(typically you wouldn't display the element name tags (eg <paragraph>) in the output). If you need to display the XML in some type of print medium, you would want to use XSL formatting objects or XSL-FO. The major web browsers don't natively support XSL-FO yet but should in a version or two. XSL-FO is primarily used for pdf generation right now. If all you want to do is have something that looks like XML but is color coded in a web browser, you can use the predefined entity references in your HTML like this: <paragraph><font color = red>hello world</font></paragraph> Please realize that this is not really XML, just a representation of it in HTML (programmers have to be sticklers for details). -----Original Message----- From: James Knight [mailto:[email protected]] Sent: Sunday, June 22, 2003 7:33 AM To: [email protected] Subject: NEED HELP, WANT TO HAVE XML TAGS AND COLOR In internet explorer. I can view an xml file in a .xml format. My question is. Say, I have <paragraph>hello world</paragraph>. But, I want to have hello world to have say the color red. How can I do that in an xml file. I want to be able to have the tags there at the same time make the "hello world" red. I can do it in html, but then I won't have the <paragraph></paragraph> tags there. I want to be able to have the tags and make the text red. Can anyone tell me how you can do that? And if not, why you can't do that? My first guess is that I would need to write a plug-in to have that feature. Thanks, LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.