Displaying XML File to CSS
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 2
- Joined: Fri May 03, 2013 12:36 pm
- Location: United Kingdom
- Contact:
Displaying XML File to CSS
Hi! I'm a learner in XML. So, I would like to know if XML file can also be display in CSS and how?
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Displaying XML File to CSS
Hello and welcome,
I'm not quite certain of what you're asking.
Do you want to style an XML with the help of a CSS?
Regards,
Adrian
I'm not quite certain of what you're asking.
Do you want to style an XML with the help of a CSS?
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Fri May 03, 2013 12:36 pm
- Location: United Kingdom
- Contact:
Re: Displaying XML File to CSS
Yes. How can I do that?adrian wrote:Hello and welcome,
I'm not quite certain of what you're asking.
Do you want to style an XML with the help of a CSS?
Regards,
Adrian
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Displaying XML File to CSS
Hi,
The same CSS rules apply for XML as for HTML, but obviously adapted to the specific elements, attributes and content of your XML file. If you want to learn CSS I suggest starting with: http://www.w3schools.com/css/
To associate a CSS to an XML document you need to specify in the XML a processing instruction like this before the root element:
If you are using Oxygen you can check out some of its XML+CSS samples.
e.g. Oxygen/samples/personal.xml and Oxygen/samples/personal.css
personal.css has some custom CSS extensions specific to Oxygen, but these can be easily identified due to their different namespace prefix (oxy).
Regards,
Adrian
The same CSS rules apply for XML as for HTML, but obviously adapted to the specific elements, attributes and content of your XML file. If you want to learn CSS I suggest starting with: http://www.w3schools.com/css/
To associate a CSS to an XML document you need to specify in the XML a processing instruction like this before the root element:
Code: Select all
<?xml-stylesheet type="text/css" href="mycssfile.css"?>
e.g. Oxygen/samples/personal.xml and Oxygen/samples/personal.css
personal.css has some custom CSS extensions specific to Oxygen, but these can be easily identified due to their different namespace prefix (oxy).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service