b****e 发帖数: 1275 | |
s******n 发帖数: 22 | 2 from http://www.w3.org/TR/1998/REC-xml-19980210#sec-pi
2.6 Processing Instructions
Processing instructions (PIs) allow documents to contain
instructions for applications.
Processing Instructions
[16] PI ::= '' Char*)))? '?>'
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
PIs are not part of the document's character data, but must
be passed through to the application. The PI begins with a
target (PITarget) used to identify the application to whic
【在 b****e 的大作中提到】 : rt..
|
b****e 发帖数: 1275 | 3 so what's the difference between a docType and a PI?
are they both
thanks
【在 s******n 的大作中提到】 : from http://www.w3.org/TR/1998/REC-xml-19980210#sec-pi : 2.6 Processing Instructions : Processing instructions (PIs) allow documents to contain : instructions for applications. : Processing Instructions : [16] PI ::= '' Char*)))? '?>' : [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) : PIs are not part of the document's character data, but must : be passed through to the application. The PI begins with a : target (PITarget) used to identify the application to whic
|
s*k 发帖数: 144 | 4 我的愚见: DTD类似于数据类型,表明的是数据本身的类型定义,
PI则是为处理xml/sgml的软件给出的提示。
【在 b****e 的大作中提到】 : so what's the difference between a docType and a PI? : are they both : thanks
|
b****e 发帖数: 1275 | 5 i asked the difference btw a docTYPE and a PI.. not DTD.
so if i call getDocType and getProcessInstruction on
a standard xml document.. with the header i gave below..
what do they return?
【在 s*k 的大作中提到】 : 我的愚见: DTD类似于数据类型,表明的是数据本身的类型定义, : PI则是为处理xml/sgml的软件给出的提示。
|
s*k 发帖数: 144 | 6 I guess you will get all the content in your <> by getDocType
and nothing from getProcessInstruction.
from specification, PItarget can not have any name with
(('X' | 'x') ('M' | 'm') ('L' | 'l')).
【在 b****e 的大作中提到】 : i asked the difference btw a docTYPE and a PI.. not DTD. : so if i call getDocType and getProcessInstruction on : a standard xml document.. with the header i gave below.. : what do they return?
|
s******n 发帖数: 22 | 7 somewhat confused....
don't know about getDocType() and getProcessingInstruction()
also can't find them in DOM API.
PI is a type of node, just like Element, Attributer,
Text......
Document is container, owning a bundle of nodes,
so there should be some sort of different between them.
【在 b****e 的大作中提到】 : i asked the difference btw a docTYPE and a PI.. not DTD. : so if i call getDocType and getProcessInstruction on : a standard xml document.. with the header i gave below.. : what do they return?
|
b****e 发帖数: 1275 | 8 getDocType gives you
getPI() gives you
i think :) never used getPI anywhere tho..
【在 s******n 的大作中提到】 : somewhat confused.... : don't know about getDocType() and getProcessingInstruction() : also can't find them in DOM API. : PI is a type of node, just like Element, Attributer, : Text...... : Document is container, owning a bundle of nodes, : so there should be some sort of different between them.
|