A small program that used python to process XML Conversion the other day to convert XML and XSL to HTML.
Libxml2 is used. Therefore, libxml2 must be installed first.
#-*-Coding: MBCS -*-#! /Usr/bin/Python
Import libxml2, libxslt
Class compoundxml:Def _ init _ (Self ):Self. _ result = noneSelf. _ XSL = noneSelf. _
xml| Conversion
Recently, I like XML programming, but also suffer from its aesthetic degree and not enough, find a lot of books to finish.
It's good to use XML, but it's still not the right language for displaying data. (more than HTML to check!) )The XML file does not look so beautiful, but it can still find a way to
Currently, the Content Management System displays the specific data on the client in two ways: XML + XSL or HTML. Take csdn as an example. Currently, both methods exist. For example, in the forum, we use XML + XSL, and in the document center we use shtml.
Based on my experiences.
The current content management system, the way to show the client specific data is mainly: xml+xsl or Html two ways. In the case of CSDN, both of these approaches are present. For example: forum, we use the xml+xsl way, the document center we use is the shtml way.
According to my experience of use. The advantage of
XSL is an extensible single-language XML style. XSL (short name: Extensible style single language, theeXtensibleStylesheetLanguage) is much more powerful than CSS style sheets. One of the main functions of XSL is to convert an XML document into an HTML file, and then deliver
The project needs to be converted to HTML file storage using Xml+xsl.I've never done anything like this before, the results of Internet search basically XML and XSL are saved and typed as files, but I've got the string here, so consider whether you can use the string directly.It is perfectly feasible to read the code found for the corresponding streamsource.In ad
reason for DTD substitution, one is that the future conditions can be expanded, two is richer and more useful than DTDs, three is written in XML, four is support data type, and five is support namespace.The advantages of XML schema:1) XML Schema XML-based, no specific syntax2) XML
XML(Extensible Markup Language) may look like some sort of a world-standard, and there's no real impact right now, even if it comes in handy later. But in fact, it has now been applied. So don't wait until the XML has been added to your favorite HTML editor to start using it. It can now solve a variety of internal problems and business-to-business systems issues.
In sparks.com, we use
Introduce the distinction of htm,html,xhtml,xml,shtml, the following content from Baidu after the knowledge collation.HTML and HTM:HTML (Hypertext Markup Language) Hypertext Transfer Language, is the description language of www, a + descriptive text composed of HTML commands, the page does not have the language of the server execution. And the HTM, in fact, and HTML does not have the essential difference, just to meet the DOS only recognize 8+3 (file
To load XSL for XML documents in real timeProgramCreate four objects. We use JavaScript as the development language to talk about the use of these four objects. The access objects used to create XSL and XML files must use multiple threads.
// Create a multi-threaded DOM object for the
say 1 months proficient design? I did 6 years of design, still feel lack of too much, design difficult ah! So from the importance of CSS than XHTML, from the Technology of gold, CSS is not as good as the design, hehe seems to say that the CSS is useless, I was wrong, don't scold me.
As for the so-called xml+xsl, it is not an upgraded version of Xhtml+css, the meaning of
Concepts
XSL is the abbreviation of extensible style sheet language. It is a language used to present XML (a subset of standard General Markup Language) data in readable format.Started with XSL
The reason why the World Wide Web Consortium (W3C) began to develop XSL is that there is a need for
? The answer is in the negative. Take your resume as an example, you need to create a separate format file that describes how each tag is displayed, as follows (assuming the file name is Resume.css):
resume{Display:block;}name{display:block; font-size:120%;}sex{display:block; Text-indent:2em}birthday{display:block; Text-indent:2em}skill{display:block; Text-indent:2em}
Description
All of the above are CSS style, we recommend that readers refer to the relevant information familiar with CSS, in
Last name: Address: Tel: Enter inventory information
2. asp file
'// obtain the form data response. write ("Total" + request. form ("count") + "record") I = request. form ("count") jxname = request. form ("jxname") jxadd = request. form ("jxadd") jxtel = request. form ("jxtel") response. write (request. form ("jxname") response. write ("") response. write (request. form ("jxadd") response. write ("") response. write (request. form ("jxtel") response. write ("") str1 = trim
Label Definition
CopyCode The Code is as follows: public class Encoding
{
Public String encode (string csource)
{
Return System. Web. httputility. htmlencode (csource );
}
}
Public class emlist: Label
{
Public override bool enableviewstate
{
Get {return false ;}
}
Public String folder file {Get; set ;}
Public object serialobject {Get; set ;}
Protected override void render (htmltextwriter writer)
{
If (serialobject = NULL)
{
Throw new exception ("the object is not initialized ");
}
System.
Use XSL to add display information to an XML document.
--------------------------------------------------------------------------------
Using XSL to display XML documentsXSL is an extensible Style single language of XML.
XSL (f
Style display of XML by XSL
The following uses another technology to display XML data documents.
Let's take a look at a specific example:
1. XML document of personnel information, customerinfo. xml
2. The display style of personnel information, customerinfo.
After installing. net2.0, start IIS and enter the URL 'HTTP: // localhost/test. aspx 'in the browser. The following error message is displayed:
The XML page cannot be displayed.XML input cannot be viewed using the XSL style sheet. Correct the error and click Refresh or try again later.--------------------------------------------------------------------------------
The name must start with an invalid cha
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.