Import javax. xml. transform .*;
Import javax. xml. transform. stream .*;
/**
* TransformDemo uses JAXP to acquire an XML Transformer. It uses the Transformer
* To transform an XML shopping cart into an HTML view of the shopping cart.
* The Transformer uses transform instructions in an XSLT (. xsl) file.
*
* The following JARs must be in your CLASSPATH:
*-Jaxp. jar
*-Xerces. jar (for SAX parser and DOM object implementations)
*-Xalan. jar (for XSLT i
A detailed example is presented to illustrate the method of editing XML document data online. Because Netscape has a weaker support for XML, data processing must be done on the server side to achieve Cross-platform data interchange. To edit an XML document, the first thing to do is to extract and display the data to the visitor, and XSL provides a good solution for us to display the XML file. The following example uses an
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 XML to standardize data representations between different systems, from Java objects to HTML data displays.
In
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 (full name: Extensible Style Single language, the extensible Stylesheet Language) is much more powerful than CSS style sheet functionalit
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. XSL
3. Test results.
Summary:
Through the above example, we also display the data in XML styles.
Let's take a look at the list of
This period learns the XSL style method for use with XSL elements value-of >,
XML is the same as DHTML (Dynamic HTML), these nodes are all objects, and these objects are layered, starting from the root node to form a hierarchical clear tree structure, which formed the Document Object Model DOM, through the object's properties, methods to access control of XML nodes.
We are not going to elaborate on the X
On the one hand, the use of XML to store data, the data logic and display logic separated, and XSL is the control of the page display, it can achieve and CSS almost the same effect;
On the other hand, XSL has an excellent use for data format conversion, which translates an XML into a variety of data formats you want, such as TXT text format, HTML format, or even another XML file. As you can see from the I
Data | Regular Series 17: How to use XSL and regular expressions to verify the validity of data
XSL is now gradually becoming a similar and SQL in XML in the database design position.
Although Microsoft's XSL is simply a function of some of these parts
But you've been able to implement very complex queries.
Although today's X
With the inheritance feature of Microsoft's XSL, you can customize the XSL function.The basic principle is to write the script code written by the user in msxsl and set this part of msxsl to inherit from the user-defined space. Then, the user can use the script code in msxsl through the user-defined space.Steps:1. XSL: defines MSXML and user space in stylesheet.X
The following concepts are compiled after reading "no nonsense XML" and "XML manual version 4" in the Super Star PDG format
1. What is XML? Extensible markup language, that isScalability Markup Language. A tag is an information symbol that a computer can understand. Through this tag, a computer can process various types of information. Article . To define these tags, you can either select an international markup language, such as HTML, or use a markup language that is freely determined by peo
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. xml.
Programmers who use the new version of eclipse indigo to develop Android have probably encountered a problem similar to me: Android program development involves various XML resources. After opening the XML file for editing and saving, eclipse indigo runs directly accidentally, opens XSL transformation intelligently to run XML, and automatically generates an out button next to the XML file. XML file, causing program compilation to fail, you must first
What is selection mode
The select Pattern statement extracts data from XML as a simple way to get data, which has a select attribute that selects data from specific node names in the XML
Note that each XSL file needs to import the XSL namespace, http://www.w3.org/TR/WD-xsl, for example, after the XML header declaration:
1, This statement selects a condition indi
What is selection mode
The select Pattern statement extracts data from XML as a simple way to get data, which has a select attribute that selects data from specific node names in the XML
Note that each XSL file needs to import the XSL namespace, http://www.w3.org/TR/WD-xsl, for example, after the XML header declaration:
1,
This statement selects a conditio
What is XPathXPath (extensible path) is to provide a shared syntactic and semantic result for the shared functions of XSL Transformation [XSLT] and XPointer [XPointer. An important objective of XPath is to address XML document components. The same as supporting this important goal
What is XPath?XPath (extensible path) is the result of converting the shared functions of [XSLT] and XPointer [XPointer] to XSL
". The XML file does not need to be modified. The modifications to the XSL file are as follows:
......
......
Function total (node, q ){
Temp = 0;
Mark = '/document/report/' + q;
V = node. selectnodes (Mark );
For (t = V. nextnode (); t = V. nextnode ()){
Temp + = Number (T. Text );
}
Return temp; // subtotal Value
}
Note:
The add part is the add part. Note that the add part is divided into two parts:
Selectnodes () ── it is a method of x
Copyright statement: original works can be reproduced. During reprinting, you must mark the original publication, author information, and this statement in hyperlink form. Otherwise, legal liability will be held. Http://blog.csdn.net/mayongzhan-ma yongzhan, myz, mayongzhan
Run echo. php, OK,
XML is displayed in XSL format// Main file: Echo. php // ---------------------------------------------------------- use echo. PHP file calls XML and
xml| Dynamic | pagination | sort | Show in http://www.asptoday.com/articles/20000724.htm there are very good examples that are about
Use XSL to dynamically sort XML documents, which are displayed in pagination.
Mainly uses three files:
Default.asp a string of XML and XSL files
Getxml.asp is equivalent to XML for default
Sample.xsl major formatting work here to do
============================================
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.