当前位置:网站首页>Simple understanding of XML and JSON
Simple understanding of XML and JSON
2022-06-11 06:01:00 【Not bald】
XML And JSON,Ajax Simple understanding
XML And JSON
XML Is an extensible markup language , Designed to transmit and store data .
effect :
1. Data transmission tools between programs
2. The configuration file
3. As a small database
characteristic :
1. Labels must be customized
2. Label case sensitive
3. Special symbols should use entity characters (&it Is the less than sign ,> Is the greater than sign ······)
4.XML Attribute values must be quoted
<root>
<to>henan</to>
<!DOCTYPE note SYSTEM "Note.dtd">
<from>anhui</from>
<heading>Reminder</heading>
<body>let go to there</body>
</root>
XML Must contain the root element , It's the parent of all the other elements , such as root It's the root element ,DOCTYPE The declaration is external DTD References to documents .
JSON Is the syntax for storing and exchanging text information , similar XML, however Than XML smaller 、 faster , Easier to parse .
JSON The functions and XML be similar .
characteristic :
1. Content summary , Easy to understand
2. No end tag
3. Able to use JavaScript eval() Method
4. Using arrays
5.JSON Objects in braces {} In the writing
myObj = {
"name":"bilibili",
"alexa":10000,
"sites": {
"site1":"https://www.bilibili.com/",
"site2":"https://www.bilibili.com/",
"site3":"https://www.bilibili.com/"
}
}
Ajax request
A way to do this without reloading the entire web page , Technology that can partially update web pages
Yes $.ajax Method
as follows :
url: Requested address
type : Type of request get( Security is not as good as post But fast ) or post( High security but slow speed ) request
data: Data sent to the server , There are two formats name=value&name=value; {key:value}
success: The request is successful , The callback function of the response
dataType : The data type of the response
Common data types are :text For plain text ,xml Express xml data ,json Express json object .
also . g e t and .get and .get and .put Method
Compared with $.ajax Simple comparison
The format is as follows :
url Requested url Address
data Data sent
callback Successful callback function
type Data type returned
边栏推荐
- More than 20 cloud collaboration functions, 3 minutes to talk through the enterprise's data security experience
- 安装Oracle数据库
- Distributed framework ray - detailed introduction to starting ray and connecting clusters
- Error:Execution failed for task ':app:buildNative'. & gt; A problem occurred'x/x/x/'NDK build' error resolution
- Summarize the five most common BlockingQueue features
- Wechat applet learning record
- When the recyclerview plays more videos, the problem of refreshing the current video is solved.
- ImageView supporting single finger sliding and double finger scaling
- Elk log system practice (VI): comparison between vector and filebeat for technology selection
- What do you need to know about Amazon evaluation?
猜你喜欢

Pycharm usage experience

The artistic director and production designer of Disney's Mandalorian revealed the virtual scene production behind it

More than 20 cloud collaboration functions, 3 minutes to talk through the enterprise's data security experience

Global case | how an airline with a history of 100 years can expand and transform to promote innovation in the aviation industry

Use com youth. banner. Solution to the inflateexception reported by the banner plug-in

Control your phone with genymotion scratch
![[IOS development interview] operating system learning notes](/img/1d/2ec6857c833de00923d791f3a34f53.jpg)
[IOS development interview] operating system learning notes

Servlet

我们真的需要会议耳机吗?

Using Internet of things technology to accelerate digital transformation
随机推荐
NDK learning notes (V)
Sword finger offer 04: find in 2D array
NDK learning notes (XI) POSIX sockect local communication
Méthode de la partie du tableau
Qmake implementation of QT project Pro script to vs solution
Invert an array with for
Installing MySQL for Linux
URL in flask_ for
AltiumDesigner2020导入3D Body-SOLIDWORKS三维模型
Nlp-d46-nlp match D15
Bit operation marks multiple switches with one parameter
Servlet
Vscode plug-in development
Managing VHDS using batch
Cocoatouch framework and building application interface
After adding the header layout to the recyclerview, use the adapter Notifyitemchanged (POS,'test') invalid local refresh
Principle of copyonwritearraylist copy on write
Do you know the functions of getbit and setbit in redis?
[daily exercise] 217 Duplicate element exists
OJDBC在Linux系统下Connection速度慢解决方案