


This article mainly introduces the basic knowledge of XML, from definition, development history to specific applications of XML. Friends in need can refer to the following
XML definition:
A markup language used to mark electronic files to make them structural. It can be used to mark data and define data types. It is a markup language that allows users to define their own markup language. source language.
XML development history?
Briefly mention Markup Language history:
1969: GML (Generalized Markup Language)--(IBMResearch)
1968: SGML (Standard Generalized Markup Language)--(ISO)
1989: HTML (Hypertext Markup Language)--TimBerners Lee
As an instance of SGML, its DTD (a rule) It is fixed as a standard, so Html cannot define the source language of other symbolic languages. And XML is fine, so XML appeared.
1998/2: XML (Extensible markup Language)
W3C(World WideWeb Consortium)
A subset of SGML
XML (definition data and metadata), XSL (style sheet description, just like CSS in html)
SGMLvsXMLvs HTML:
SGML: Store electronic files for a long time.
The usage fee is high, mostly on the MainFrame platform.
XML: Web page file language, data exchange language, data processing language, file integration language.
The scope of application is almost unlimited.
HTML: Web page rendering language, hypertext language.
XML includes:
File content:
Structure definition: DTD (Document TypeDefinitied)
XMLSchema(DTD+Datatype)
Display: XSL
XSLT+XHTML+Xpath+(Xlink)
From html to XML:
HTML:
html can only provide data display function. The browser provides a single language mechanism. Web search is not accurate. Difficulty in expansion. Logical relationships between web pages and web page hierarchical authentication are difficult to establish. Web resources are restricted and cannot be used by other applications.XML:
Open platform. Can be used as input data for any program. XML changes the internal structure of the browser.XML specific application:
One of the most important applications of XML is as theconfiguration file of the system. Many system configuration files are used XML, XML in Spring application, XML in Hibernate, here we mainly talk about XML in ASP.NET.
1. In the configuration file.
All encounters in the world are reunions after a long absence. We have passed by XML countless times, including the configuration files of the computer room charging system, the configuration files of the news release system, and the configuration files we have established for each The configuration file under an application has the suffix name of .config, and our XML file has the suffix of .xml. Why does VS not use Web.xml directly but Web.config? I think it may be because Microsoft wants to Packing something into a confidant is like the same apple in a box. If I want it to be mine, I have to make a package and put my label on it, telling others that this is unique to me. But in fact, there are answers like this on the Internet:config is the configuration, and .xml is the web page file built into the software.
Appearance:
Former:Used in web.config or app.config etc.< ;appSettings> is a node agreed by the system. It is agreed that allSimply put:
Simply put, config is a subset of xml. Usually xml only defines basic syntax. As for the node level, node format, node meaning, and how the node is parsed, you can define it yourself. This will make your xml file compatible with your xml parsing method. correspond. As for web.config, app.config and the like, Microsoft and software authors have already defined the meaning of nodes. You only need to follow its format and rules to achieve the configuration effect.In layman’s terms:
Let’s use an analogy that may not be a good one: The xml file itself is a playing card.config It's Landlords. When you use config, you don’t need to make your own rules, just follow its rules. It's convenient, but you can't break his rules.When you write xml yourself, you must first formulate the rules. You can decide the rules as you like, and then play according to these rules.
Of course, there is a major premise for these, and they all meet the xml node specifications. , you can't put a few mahjong tiles into the rules of poker....
2, ASP.NETControl and XML.
When learning ASP.NET videos, I used many controls, such as LIstBox, DropDownList common controls, DataList, GridView and other data controls, ADO.NETDataSet to operate XML files, and the first two blogs The mentioned Navigation controls menu and treeview can bind XML files when binding data sources.
The above is the detailed content of A preliminary understanding of XML basics (pictures and texts). For more information, please follow other related articles on the PHP Chinese website!

RSS and XML are tools for web content management. RSS is used to publish and subscribe to content, and XML is used to store and transfer data. They work with content publishing, subscriptions, and update push. Examples of usage include RSS publishing blog posts and XML storing book information.

RSS documents are XML-based structured files used to publish and subscribe to frequently updated content. Its main functions include: 1) automated content updates, 2) content aggregation, and 3) improving browsing efficiency. Through RSSfeed, users can subscribe and get the latest information from different sources in a timely manner.

The XML structure of RSS includes: 1. XML declaration and RSS version, 2. Channel (Channel), 3. Item. These parts form the basis of RSS files, allowing users to obtain and process content information by parsing XML data.

RSSfeedsuseXMLtosyndicatecontent;parsingtheminvolvesloadingXML,navigatingitsstructure,andextractingdata.Applicationsincludebuildingnewsaggregatorsandtrackingpodcastepisodes.

RSS documents work by publishing content updates through XML files, and users subscribe and receive notifications through RSS readers. 1. Content publisher creates and updates RSS documents. 2. The RSS reader regularly accesses and parses XML files. 3. Users browse and read updated content. Example of usage: Subscribe to TechCrunch's RSS feed, just copy the link to the RSS reader.

The steps to build an RSSfeed using XML are as follows: 1. Create the root element and set the version; 2. Add the channel element and its basic information; 3. Add the entry element, including the title, link and description; 4. Convert the XML structure to a string and output it. With these steps, you can create a valid RSSfeed from scratch and enhance its functionality by adding additional elements such as release date and author information.

The steps to create an RSS document are as follows: 1. Write in XML format, with the root element, including the elements. 2. Add, etc. elements to describe channel information. 3. Add elements, each representing a content entry, including,,,,,,,,,,,. 4. Optionally add and elements to enrich the content. 5. Ensure the XML format is correct, use online tools to verify, optimize performance and keep content updated.

The core role of XML in RSS is to provide a standardized and flexible data format. 1. The structure and markup language characteristics of XML make it suitable for data exchange and storage. 2. RSS uses XML to create a standardized format to facilitate content sharing. 3. The application of XML in RSS includes elements that define feed content, such as title and release date. 4. Advantages include standardization and scalability, and challenges include document verbose and strict syntax requirements. 5. Best practices include validating XML validity, keeping it simple, using CDATA, and regularly updating.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Notepad++7.3.1
Easy-to-use and free code editor

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version
SublimeText3 Linux latest version

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),