How to create an XML file and then create a style sheet file associated with it?

Source: Internet
Author: User

Create an XML file stored as first. xml

<? XML version = "1.0" encoding = "gb2312" standalone = "yes"?>

<Pageview>

Welcome to XML

</Pageview>

The simple concept is described here. Although many books have mentioned it, here is a simple description.

The first sentence is to process the command with <? Start, and start with?> End.

XML Declaration has three features: version, encoding, and standalone. Standalone indicates whether the XML background supports DTD files.

Create a sample table file and store it as first.css

Pageview {font-size: 24pt; font-weight: bold; color: red ;}

Now, how can I connect first.xmlwith the first.css file? That is to say, how can I display my data in the "welcome to use XML" format in a browser?

Still processing command! The Processing Command is <? XML-stylesheet?> And its two features: type and href. The Type attribute specifies the style language used, while the href attribute specifies a URL that can locate the style sheet (which may be relative ). Add a row after the first line in first. xml,

<? XML-stylesheet type = "text/CSS" href = "first.css"?>

In this way, you can view first. XML to see what you want!

It's just a memo!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.