By GokiSoft.com|
20:18 06/06/2022|
Học PHP
[XML] Tạo tài liệu XML
#vidu.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book [
<!ELEMENT book (title, author, price)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ENTITY TVD "TRAN VAN DIEP">
]>
<book-list xmlns:s = "URL">
<s:book xmlns:s="URL1" xmlns="URL5">
<title><![CDATA[ Lap Trinh C <>sdjhfdsfh w8r3i4 ]]></title>
<s:author>Aptech - &TVD;</s:author>
<price>200,000 VND</price>
</s:book>
<s:book xmlns:k="URL2">
<k:title><![CDATA[ Lap Trinh C <>sdjhfdsfh w8r3i4 ]]></k:title>
<author>Aptech - &TVD;</author>
<price>200,000 VND</price>
</s:book>
<t1:book xmlns:t1="URL3" xmlns:t2="URL4">
<t1:title><![CDATA[ Lap Trinh C <>sdjhfdsfh w8r3i4 ]]></t1:title>
<t2:author>Aptech - &TVD;</t2:author>
<price>200,000 VND</price>
</t1:book>
</book-list>
#vidu.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Book Management Page</title>
</head>
<body>
<table border="1">
<tr>
<td>Name</td>
<td>Author</td>
<td> ><Price</td>
</tr>
<tr>
<td>Lap Trinh C</td>
<td>Aptech</td>
<td>200,000 VND</td>
</tr>
</table>
</body>
</html>
Tags:
Phản hồi từ học viên
5
(Dựa trên đánh giá ngày hôm nay)