001 /*
002 * Copyright (c) 2004 World Wide Web Consortium,
003 *
004 * (Massachusetts Institute of Technology, European Research Consortium for
005 * Informatics and Mathematics, Keio University). All Rights Reserved. This
006 * work is distributed under the W3C(r) Software License [1] in the hope that
007 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
008 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
009 *
010 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
011 */
012
013 package org.w3c.dom;
014
015 /**
016 * The <code>ProcessingInstruction</code> interface represents a "processing
017 * instruction", used in XML as a way to keep processor-specific information
018 * in the text of the document.
019 * <p> No lexical check is done on the content of a processing instruction and
020 * it is therefore possible to have the character sequence
021 * <code>"?>"</code> in the content, which is illegal a processing
022 * instruction per section 2.6 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
023 * presence of this character sequence must generate a fatal error during
024 * serialization.
025 * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
026 */
027 public interface ProcessingInstruction extends Node {
028 /**
029 * The target of this processing instruction. XML defines this as being
030 * the first token following the markup that begins the processing
031 * instruction.
032 */
033 public String getTarget();
034
035 /**
036 * The content of this processing instruction. This is from the first non
037 * white space character after the target to the character immediately
038 * preceding the <code>?></code>.
039 */
040 public String getData();
041 /**
042 * The content of this processing instruction. This is from the first non
043 * white space character after the target to the character immediately
044 * preceding the <code>?></code>.
045 * @exception DOMException
046 * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
047 */
048 public void setData(String data)
049 throws DOMException;
050
051 }