1. /*
  2. * Copyright (c) 2004 World Wide Web Consortium,
  3. *
  4. * (Massachusetts Institute of Technology, European Research Consortium for
  5. * Informatics and Mathematics, Keio University). All Rights Reserved. This
  6. * work is distributed under the W3C(r) Software License [1] in the hope that
  7. * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  8. * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. *
  10. * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
  11. */
  12. package org.w3c.dom;
  13. /**
  14. * The <code>ProcessingInstruction</code> interface represents a "processing
  15. * instruction", used in XML as a way to keep processor-specific information
  16. * in the text of the document.
  17. * <p> No lexical check is done on the content of a processing instruction and
  18. * it is therefore possible to have the character sequence
  19. * <code>"?>"</code> in the content, which is illegal a processing
  20. * instruction per section 2.6 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
  21. * presence of this character sequence must generate a fatal error during
  22. * serialization.
  23. * <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>.
  24. */
  25. public interface ProcessingInstruction extends Node {
  26. /**
  27. * The target of this processing instruction. XML defines this as being
  28. * the first token following the markup that begins the processing
  29. * instruction.
  30. */
  31. public String getTarget();
  32. /**
  33. * The content of this processing instruction. This is from the first non
  34. * white space character after the target to the character immediately
  35. * preceding the <code>?></code>.
  36. */
  37. public String getData();
  38. /**
  39. * The content of this processing instruction. This is from the first non
  40. * white space character after the target to the character immediately
  41. * preceding the <code>?></code>.
  42. * @exception DOMException
  43. * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
  44. */
  45. public void setData(String data)
  46. throws DOMException;
  47. }