Does XML officially support a “dir” or “xml:dir” attribute?
问题 You can find various documents that say to specify the language of the content of an XML document, use xml:lang , like this: <foobar xml:lang="en">...</foobar> HTML and XHTML has the attribute dir that lets you specify that the text should be considered left-to-right by default, or right-to-left by default: <html dir="rtl">...</html> Is there an equivalent attribute for XML? Is the only solution to include Unicode RIGHT-TO-LEFT mark in every text node? 回答1: The W3C XML Recommendation itself