Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 12th, 2012, 8:04 AM   #1
sian78lu
Newbie
 
Join Date: Nov 2011
Posts: 8
Rep Power: 0 sian78lu is on a distinguished road
Cool Connecting An External Stylesheet To An XML file

This very short tutorial will cover one way to connect an external style sheet to your xml file, you can do tis in a number of ways but I will show you the most popular method.

This involves two stages. Stage one will cover the sample xml code, and stage two will cover the sample (CSS) style sheet.
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<?xml-stylesheet type=”text/css” href=”yourfile.css”?><!–The css file is called in here–>
<stock>
<dress>
<item>short white dress</item>
<quantity>5</quantity
<size>Medium</size>
</dress>
</stock>
 
/****************** yourfile.css **************/
@charset “utf-8″;
/* CSS Document */
stock, dress
{
font-family:”times new roman;
}
item
{
display:block;
font-size:20px;
color:#E19;
}
quantity, size
{
display:block;
}
And thats it, a simple amnd straightforward way to call a stylesheet from you xml file.
__________________
Liquid XML Editor | Complete XML Toolkit

Last edited by Ancient Dragon; Apr 12th, 2012 at 10:20 AM. Reason: add code tags
sian78lu is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Synchronisation between a local xml file and my web server rendy.dev Databases 0 Jan 11th, 2010 4:16 AM
Read XML file currupipi Python 1 Apr 10th, 2009 1:39 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:12 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC