Package org.w3c.dom

Examples of org.w3c.dom.ProcessingInstruction


   
    /**
     *  Receive notification of a processing instruction.
     */
    public final void processingInstruction(String _target, String _data) {
        ProcessingInstruction piNode = domFactory.createProcessingInstruction(_target, _data);
        if (debug) {
            System.out.println(this.getClass().getName() + ": processingInstruction(...)");
        }

        if (this.processLevel == 0) {
View Full Code Here


    characters(ch, start, length);
  }

  public void processingInstruction(String pTarget, String pData)
      throws SAXException {
    ProcessingInstruction pi = getDocument().createProcessingInstruction(pTarget, pData);
    currentNode.appendChild(pi);
  }
View Full Code Here

    throws XPathException
  {
    Iterator iter = XPath.select("//processing-instruction('xml-stylesheet')",
                                 doc);
    while (iter.hasNext()) {
      ProcessingInstruction pi = (ProcessingInstruction) iter.next();
      String value = pi.getNodeValue();
      String piMedia = XmlUtil.getPIAttribute(value, "media");
     
      if (piMedia == null || piMedia.equals(media))
        return XmlUtil.getPIAttribute(value, "href");
    }
View Full Code Here

    throws XPathException
  {
    Iterator iter = XPath.select("//processing-instruction('xml-stylesheet')",
                                 doc);
    while (iter.hasNext()) {
      ProcessingInstruction pi = (ProcessingInstruction) iter.next();
      String value = pi.getNodeValue();
      String piMedia = XmlUtil.getPIAttribute(value, "media");
     
      if (piMedia != null)
        return true;
    }
View Full Code Here

            break;
        case Node.ENTITY_REFERENCE_NODE:
            writer.writeEntityRef(((EntityReference)n).getNodeValue());
            break;
        case Node.PROCESSING_INSTRUCTION_NODE:
            ProcessingInstruction pi = (ProcessingInstruction)n;
            writer.writeProcessingInstruction(pi.getTarget(), pi.getData());
            break;
        case Node.DOCUMENT_NODE:
            writeDocument((Document)n, writer, repairing);
            break;
        case Node.DOCUMENT_FRAGMENT_NODE: {
View Full Code Here

        }
    }

    public String getProcessingInstructionTarget(Object obj)
    {
        ProcessingInstruction pi = (ProcessingInstruction) obj;

        return pi.getTarget();
    }
View Full Code Here

        return pi.getTarget();
    }

    public String getProcessingInstructionData(Object obj)
    {
        ProcessingInstruction pi = (ProcessingInstruction) obj;

        return pi.getData();
    }
View Full Code Here

                                         node.getNodeName(),
                                         new AttList(atts, m_dh));
      break;
    case Node.PROCESSING_INSTRUCTION_NODE :
    {
      ProcessingInstruction pi = (ProcessingInstruction) node;
      String name = pi.getNodeName();

      // String data = pi.getData();
      if (name.equals("xslt-next-is-raw"))
      {
        nextIsRaw = true;
      }
      else
      {
        this.m_contentHandler.processingInstruction(pi.getNodeName(),
                                                    pi.getData());
      }
    }
    break;
    case Node.CDATA_SECTION_NODE :
    {
View Full Code Here

     */
    public void callProcessingInstruction(int piTarget, int piData)
        throws Exception {

        // create pi
        ProcessingInstruction pi =
            fGrammarDocument.createProcessingInstruction(fStringPool.toString(piTarget),
                                                         fStringPool.toString(piData));
        fCurrentElement.appendChild(pi);

    } // callProcessingInstruction(int,int)
View Full Code Here

                                         node.getNodeName(),
                                         new AttList(atts, m_dh));
      break;
    case Node.PROCESSING_INSTRUCTION_NODE :
    {
      ProcessingInstruction pi = (ProcessingInstruction) node;
      String name = pi.getNodeName();

      // String data = pi.getData();
      if (name.equals("xslt-next-is-raw"))
      {
        nextIsRaw = true;
      }
      else
      {
        this.m_contentHandler.processingInstruction(pi.getNodeName(),
                                                    pi.getData());
      }
    }
    break;
    case Node.CDATA_SECTION_NODE :
    {
View Full Code Here

TOP

Related Classes of org.w3c.dom.ProcessingInstruction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.