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..
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
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
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
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?
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
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?
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
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.
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.
相关阅读