close
在製作xml menu發現有的網址有包含&導致不能 有效果

查了一下xml encode的說明

2.5. Language and character encoding

XML provides an xml:lang attribute that can be used on any element. This provides a way to describe the language used for the content of the element. The DCMES provides aLanguage element which is used to describe the language of the resource.

The values of the elements and attributes will need to be encoded using the rules of XML when there are special characters in the value. The special characters that need to be encoded, and when they need to be are summarised here for reference:

Plain text XML Encoding Required in
&&Element and attribute values
<<Element and attribute values
>>Element and attribute values
' (apostrophe / single quote)'Attribute values
" (double quote)"Attribute values

Note that the ' and " only need to be used for those character inside attribute values, which are only needed for the rdf:resource attribute (see Section 2.4) and thexml:lang attribute (see Section 2.5).

All other characters outside the core US-ASCII range of 32-126 should not be encoded with the HTML entities such as é since these are not defined in XML. Numeric entities for the characters should be used which are written as &#ddd; in decimal or ઼ in hexadecimal. Alternatively they can be encoded as Unicode in one of the formats such as UTF-8 which is widely supported.

http://dublincore.org/documents/2001/04/11/dcmes-xml/

 
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 peicheng 的頭像
    peicheng

    FLASHC

    peicheng 發表在 痞客邦 留言(0) 人氣()