🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.xml
1 messages
1 total messages Started by WE Fri, 19 Nov 2010 02:49
Re: xml�ĵ��������ʲô��Ϣ������DOM2����DOM3�ĵ�?
#103
Author: WE
Date: Fri, 19 Nov 2010 02:49
42 lines
3345 bytes
1�� ���⡣�����дһ��xml�ĵ�����ô����ĵ��������ʲô���ݣ�������DOM2������DOM3���ĵ���?

���ҵ���⣬XML�ĵ�����û��DOM2,DOM3����֡�

DOM�ǰ����νṹ����XML��API�Ĺ淶��DOM2��DOM3��������API�淶�IJ�ͬ�汾������JDBC1/JDBC2�Ĺ�ϵ��

XML�ĵ����˰�DOM��ʽ�����������԰�SAX��ʽ���Լ���SAX���ϵ�Streaming API���Լ�XML-����ӳ��API��

2����xml�ĵ���ͷ���Ƿ���Ҫָ��һ����ȷ�İ汾? ����˵���ĵ��İ汾����xml�������������жϵ�?

XML Declaration�е�����汾��ָ����Parser���ģ�����XML�ļ���XML Declaration���֣�һ��ָ����1.0�����ˡ�

��XML in a nutshell�����ᵽ��
2.9.1 The version Attribute
The version attribute should have the value 1.0. Under very unusual circumstances, it may also have the 
value 1.1. Since specifying version="1.1" limits the document to the most recent versions of only a 
couple of parsers, and since all XML 1.1 parsers must also support XML 1.0, you don't want to casually 
set the version to 1.1.
Don't believe us? First answer a couple of questions:
1) Do you speak Cambodian, Burmese, Amharic, Mongolian, or Divehi?
2) Does your data contain obsolete, nontext C0 control characters such as vertical tab, form feed, or 
bell?
If you answered no to both of these questions, you have absolutely nothing to gain by using XML 1.1. If 
you answered yes to either one, then you may have cause to use XML 1.1. 

XML 1.0 allows Cambodian, Burmese, Amharic, etc. to be used in character data and attribute values. 
XML 1.1 also allows these scripts to be used in element and attribute names, which XML 1.0 does not. 
XML 1.1 also allows C0 control characters (except null) to be used in character data and attribute values 
(provided they're escaped as numeric character references like ), which XML 1.0 does not. 
If either of these conditions applies to you, then you might want to use XML 1.1 (although realize you're 
limiting your audience by doing so). Otherwise, you really should use XML 1.0 exclusively.




�� �� daishu59 (daishu59) �Ĵ������ᵽ: ��
: 
: лл�ˣ�

--

�� ��Դ:��ˮľ���� http://newsmth.net��[FROM: 198.80.129.*]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads