Redian新闻
>
newbie question.. what's process instruction?
avatar
s*n
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..
avatar
b*e
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

avatar
s*k
4
我的愚见: DTD类似于数据类型,表明的是数据本身的类型定义,
PI则是为处理xml/sgml的软件给出的提示。

【在 b****e 的大作中提到】
: so what's the difference between a docType and a PI?
: are they both
: thanks

avatar
b*e
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的软件给出的提示。

avatar
s*k
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?

avatar
s*n
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?

avatar
b*e
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.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。