ProcessingInstruction

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!
您也可以阅读此文章的English (US)版。

A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them. Even if an XML processor ignores processing instructions, it will give them a place in the DOM.

A processing instruction is different from the XML declaration, which supplies information about the document such as character encoding, and can only appear as the first item in a document.

User-defined processing instructions cannot begin with 'xml', as these are reserved (such as <?xml-stylesheet ?>).

Processing instructions inherit methods and properties from Node.

Attributes

  • target (DOMString) - after the <? and before whitespace separating it from data
  • data (DOMString) - first non-whitespace character after target and before ?>

Specification

See also

文档标签和贡献者