锘??xml version="1.0" encoding="utf-8" standalone="yes"?>在线免费激情视频,欧美日韩亚洲一区,日韩欧美影院http://www.aygfsteel.com/yuxh/category/48137.htmlwayzh-cnThu, 24 Mar 2011 02:01:29 GMTThu, 24 Mar 2011 02:01:29 GMT60XML浠嬬粛http://www.aygfsteel.com/yuxh/archive/2011/03/24/346908.htmlyuxhyuxhThu, 24 Mar 2011 01:05:00 GMThttp://www.aygfsteel.com/yuxh/archive/2011/03/24/346908.htmlhttp://www.aygfsteel.com/yuxh/comments/346908.htmlhttp://www.aygfsteel.com/yuxh/archive/2011/03/24/346908.html#Feedback0http://www.aygfsteel.com/yuxh/comments/commentRss/346908.htmlhttp://www.aygfsteel.com/yuxh/services/trackbacks/346908.htmlDTDs

Introduced as part of the XML 1.0 specification, DTDs are the oldest constraint model around in the XML world. They're simply to use, but this simplicity comes at a price: DTDs are inflexible, and offer you little for data type validation as well.

XML Schema (XSD)

XML Schema is the W3C's anointed successor to DTDs. XML Schemas are literally orders of magnitude more flexible than DTDs, and offer an almost dizzying array of support for various data types. However, just as DTDs were simple and limited, XML Schemas are flexible, complex, and (some would argue) bloated. It takes a lot of work to write a good schema, even for 50- or 100-line XML documents. For this reason, there's been a lot of dissatisfaction with XML Schema, even though they are widely being used.

[prefix]:[element name]
鍏冪礌錛?br>root鍏冪礌蹇呴』鍖呭惈鎵鏈夋枃妗d腑鐨勫厓绱狅紝鍙兘鏈変竴涓猺oot鍏冪礌銆傚厓绱犲悕鍙兘浠ヤ笅鍒掔嚎鎴栧瓧姣嶅紑澶達紝涓嶈兘鏈夌┖鏍鹼紝鍖哄垎澶у皬鍐欍傚紑鍏冪礌蹇呴』鏈夊搴旈棴鍏冪礌錛堜篃鏈夌被浼糷tml鐨勭畝鍐欙紝濡?lt;img src="http://www.aygfsteel.com/images/xml.gif" />錛夈傛枃妗g敱DTD鎴杝chema鏉ラ檺鍒跺畠鏄惁鍚堟牸銆?/pre>
灞炴э細
浠涔堟椂鍊欑敤灞炴э紵鍩烘湰鍘熷垯錛氬涓肩殑鏁版嵁鐢ㄥ厓绱狅紝鍗曞肩殑鏁版嵁鐢ㄥ厓绱犮傚鏋滄暟鎹湁寰堝鍊兼垨鑰呮瘮杈冮暱錛屾暟鎹渶鍙兘灞炰簬鍏冪礌銆備粬涓昏琚綋浣滄枃鏈紝瀹?lt;rss:author>Doug Hally</rss:author> <journal:author>Neil Gaiman</journal:author>鏄撴悳绱紝濂界敤銆傛瘮濡備竴鏈功鐨勭珷鑺傛弿榪般傜劧鑰屽鏋滄暟鎹富瑕佷綔涓哄崟鍊煎鐞嗙殑璇濓紝鏈濂戒綔涓哄睘鎬с傚鏋滄悶涓嶆竻妤氾紝鍙互瀹夊叏鐨勪嬌鐢ㄥ厓绱犮?/pre>
鍛藉悕絀洪棿Namespaces錛?br>xml鐨勫懡鍚嶇┖闂存槸涓縐嶇敤涓涓壒瀹氱殑URI鏉ュ叧鑱擷ML鏂囨。閲岀殑涓涓垨澶氫釜鍏冪礌鐨勬柟娉曘傛剰鍛崇潃鍏冪礌鏄敱鍚嶅瓧鍜屽懡鍚嶇┖闂翠竴璧鋒潵璇嗗埆鐨勩傝澶氬鏉傜殑XML鏂囦歡閲岋紝鍚屼竴涓悕瀛椾細鏈夊涓敤閫斻傛瘮濡傦紝涓涓猂SS feed鏈変竴涓綔鑰咃紝榪欎釜浣滆呭悓鏃舵槸姣忎釜鏃ヨ鐨勩傝櫧鐒惰繖浜涙暟鎹兘鐢╝uthor鍏冪礌鏉ヨ〃紺猴紝浣嗕粬浠笉搴旇琚綋浣滃悓涓涓?em>綾誨瀷鐨勬暟鎹傚懡鍚嶇┖闂村緢濂界殑瑙e喅浜嗚繖涓棶棰橈紝鍛藉悕絀洪棿璇存槑涔﹁姹備竴涓墠緙鍜屽敮涓鐨刄RI鑱斿悎璧鋒潵鍖哄垎涓嶅悓鍛藉悕絀洪棿閲岀殑鍏冪礌銆傚http://www.neilgaiman.com/entries浣滀負URI錛岃仈鍚堝墠緙journal鐢ㄦ潵琛ㄧず鏃ュ織鐩稿叧鐨勫厓绱犮?br><rdf:RDF xmlns:rss="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:journal="http://www.neilgaiman.com/entries">錛岀劧鍚庡氨鍙嬌鐢ㄤ簡錛?br><rss:author>Doug Hally</rss:author> <journal:author>Neil Gaiman</journal:author>瀹為檯涓婂湪浣跨敤鍛藉悕絀洪棿鍓嶇紑鐨勬椂鍊欏啀瀹氫箟涔熷彲浠ョ殑錛?br><rss:author xmlns:rss="http://www.w3.org/1999/02/22-rdf-syntax-ns#">Doug Hally</rss:author>
濡傛灉鍚嶅瓧娌℃湁鍛藉悕絀洪棿錛屼笉浠h〃鍦ㄩ粯璁ゅ懡鍚嶇┖闂翠腑錛岃屾槸xml澶勭悊鍣ㄤ互鍦ㄤ換浣曞懡鍚嶇┖闂翠互澶栨柟寮忚В閲婁粬銆傝澹版槑榛樿鍛藉悕絀洪棿鐨勮瘽灝變笉鐢ㄥ悗闈㈠啋鍙烽儴鍒嗭紝濡?lt;Insured xmlns="浣跨敤鐨勪竴浜涙湳璇?/strong>:
  • The name of a namespace (such as http://www.ibm.com/software) is the namespace URI.

  • The element or attribute name can include a prefix and a colon (as in prod:Quantity). A name in that form is called a qualified name, or QName, and the identifier that follows the colon is called a local name. If a prefix is not in use, neither is the colon, and the QName and local name are identical.

  • An XML identifier (such as a local name) that has no colon is sometimes called an NCName. (The NC comes from the phrase no colon.)

Entity references:
鐢ㄦ潵澶勭悊杞箟瀛楃錛岃娉曟槸& [entity name] ;XML瑙f瀽鍣ㄧ鍒拌繖縐峞ntity reference錛屽氨浼氱敤瀵瑰簲鐨勫兼浛鎹㈡帀浠栥傚&lt;錛?lt;錛?&gt;(>),&amp;(&),&quot;("),&apos;(')銆傛敞鎰廵ntity reference鏄敤鎴峰彲瀹氫箟鐨勩傛瘮濡傚澶勭敤鍒扮増鏉冩彁紺猴紝鑷繁瀹氫箟鍚庝互鍚庢洿鏀瑰氨鏂逛究浜嗭細<ora:copyright>&OReillyCopyright;</ora:copyright>銆傞櫎浜嗙敤鏉ヨ〃紺烘暟鎹腑鐨勫鏉傛垨鐗規畩瀛楃澶栵紝entity reference榪樹細鏈夋洿澶氱敤閫斻?/p>

涓嶈В鏋愮殑鏁版嵁錛?br>褰撲紶杈撳ぇ閲忔暟鎹粰搴旂敤涓斾笉鐢▁ml瑙f瀽鐨勬椂鍊欙紝CDATA灝辨湁鐢ㄤ簡銆傚綋澶ч噺鐨勫瓧絎﹂渶瑕佺敤entity reference杞箟鐨勬椂鍊欙紝鎴栫┖鏍煎繀欏諱繚鐣欑殑鏃跺欙紝浣跨敤CDATA銆?lt;![CDATA[鈥?]]>



yuxh 2011-03-24 09:05 鍙戣〃璇勮
]]> 主站蜘蛛池模板: 镇原县| 临高县| 清苑县| 乾安县| 琼中| 杂多县| 万年县| 平远县| 富阳市| 湖南省| 沙田区| 常熟市| 胶南市| 宜丰县| 长沙市| 文昌市| 册亨县| 衡阳县| 江门市| 靖州| 民和| 汽车| 五峰| 乌拉特前旗| 惠州市| 长沙县| 隆林| 新野县| 商都县| 通榆县| 易门县| 沭阳县| 宝鸡市| 石狮市| 资源县| 三江| 定日县| 滨州市| 新营市| 肥西县| 祥云县|