File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Applying CSS to XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Applying CSS to XML " Watch "Applying CSS to XML " New topic

Applying CSS to XML

Karne Reddy
Ranch Hand

Joined: May 28, 2006
Posts: 35
Hi Friends ,
This is my first post in xml.

Iam having a problem while i am trying to apply a css file to XML file.
I am not getting the expected results.


My xml file employees.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2005 rel. 3 U (>
<employees xmlns:xsi="" xsi:schemaLocation=" employees.xsd" xmlns="">
<?xml-stylesheet type=�text/css� href="emp.css�?>

<employee position="manager">

Here is my css file emp.css

display: block;
font-weight : bold;
name {
display: block;
font-weight : bold;
display: none;

When when i am accessing the employees.xml file in browser(Mozilla &
IE) I am not getting the expected result.

Can anybody help me out?


I agree. Here's the link:
subject: Applying CSS to XML
It's not a secret anymore!