This article illustrates the way JS uses Ajax to dynamically obtain data display from XML files. Share to everyone for your reference. The specific analysis is as follows:
The following JS code through AJAX to retrieve the content of XML files dynamically displayed to the Web page, the entire page without refreshing
The contents of the
The XML file is:
The. CS file code is:
/** Display all content of the XML document on the console using a Tree Structure*/
Using system;Using system. Collections. Generic;Using system. text;
Using system. xml;
Namespace displayxmldemo{Class Program{Static void main (string [] ARGs){System.
Freed from the code for presentation
• Can the business and presentation be separated?
Simply sum up the projects or products that you have done, business is often not reproducible, but what about presentation? Is it true that you are always doing a list, displaying detailed information, and performing graphic analysis?• Can it be freed from the implementation of heavy page display?
In fact, the interface framework and some workflow platforms are tryi
Let's look at their historical origins first:
sgml--1986 International Organization for Standardization publishes a standard in information management (ISO 8,879:1986 processing).
HTML 2.0--released as RFC 1866 in November 1995
XML 1.0--1998, published the XML1.0 specification, used to simplify the transmission of document information on the Internet
XHTML 1.0--2000 as a recommended sta
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
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
You can use a simple XSL style sheet to convert xml data into HTML. With the continuous evolution of XML specifications, it seems necessary to meet the needs of everyone in the new version. Unfortunately, simple conversions have always plagued the specifications. You can use a simple XSL style sheet to convert xml data
XmlAdvantages:One of the big advantages of XML is that it is an extensible format that, when used, is not subject to a predetermined data structure, but is free to define the desired structure as long as the structure remains consistent throughout the document. Another benefit of XML is that it conforms to the DOM standard, as long as the data obtained through AJAX calls can be parsed like ordinary
The following example maps a tag in an XML document directly to an HTML tag character. Elements that do not exist in the "map array" are ignored. Of course, this example will only work for a particular XML document.
$file = "Data.xml";$map _array = Array ("BOLD" => "B","emphasis" => "I","LITERAL" => "TT");
function startelement ($parser, $name, $attrs) {Global $m
Use python to design HTML-Based C language syntax to highlight the display program1st-school year semesterCompilation and translation principleCourse schedule reportClass 02 (II)Student ID 19Name: Liu XiaomingScoreInstructor Lu chaohuiI. design purposeDeepen understanding of compilation principles, strengthen hands-on practice and program development capabilities, and improve the ability to analyze and solv
As the following code details, HTML references XML data island, how to cross the tree structure of the relationship? I don't know how to use the tag name in XML inside this datafld, how to prefix it, how to get the name child element from resume, and how should my HTML file be modified?
The
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 =
js|xml| conversion We know that XML+XSLT can be directly output to support XML browser, such as IE more than 5.0, but we also have to consider that there are many browsers do not directly support XML, in this case, we need to convert the server to HTML output to the browser,
PHP strip_tags () goes to the function of HTML, XML, and PHP tags in the string, Strip_tagsxml
Strip_tags Definition and usage
The Strip_tags () function strips the HTML, XML, and PHP tags from the string.
Note: This function always strips HTML comments. This cannot be chan
Today, we used XSLT to convert XML and found the html
CodeThe display is abnormal. For example:
XML file:
XSLT file:
is displayed, but the image to be displayed is displayed. I found a solution to the problem on the Internet and shared it with you.You just need to change the XSLT file to this:
Import java. Lang. String;Import java. RMI. RemoteException;Import java. util. iterator;Import java. util. List;
Import org. Apache. axis2.axisfault;Import org. dom4j .*;
Public class user{
// Convert an XML string into an HTML language in the form of a tablePublic static string outputintable (string XML, string trclass, string tdclass){//
1. HTML processing is relatively simple and can be output directly.
Generally, you can use $ ("jb51div"). innerhtml, etc.
2. JSON format data callingCopyCodeThe Code is as follows: $. Ajax ({URL: "/trundle/rawcontentaction. getajaxcontent. Act ",Data: "param1 = 22 ",Datatype: "JSON", // The datatype here is the returned data format in HTML, XML, JSONCache: f
Xml
The previous article talked about how XSL and XML are browsed on the client side. It is also a form of content publishing for CMS content management systems, i.e. XSL (template) +xml (content).
But the reality is not supported by the client browser, this will also give the server a certain amount of load, the best way to reduce the server service load is to f
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.