File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CSS with XML

 
aiooua
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use CSS to render my XML documents. How?
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes!
First you link your XML document to external CSS stylesheet:
<?xml-stylesheet type=�text/css� href=�myStylesheet.css� ?>
And then, if you have an element with "myElement" name, for example, you can link it with CSS rules as
myElement
{ background-color: white;
border-color: blue;
font-size: 80%
...
}
I read that it's also possible to use internal CSS:
<?xml-stylesheet type=�text/css� href=�#myStylesheet� ?>
<document>
<CSS id=�myStylesheet�>
myElement { some rules here
}
</CSS>
<myElement>blah-blah-blah</myElement>
</document>
but it did not work for me...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic