Examples of ProcessingInstruction


Examples of org.apache.abdera.model.ProcessingInstruction

                process(child, new ObjectContext(child), context, conventions);
            } else if (child instanceof Comment) {
                Comment comment = (Comment)child;
                sw.writeComment(comment.getText());
            } else if (child instanceof ProcessingInstruction) {
                ProcessingInstruction pi = (ProcessingInstruction)child;
                sw.writePI(pi.getText(), pi.getTarget());
            } else if (child instanceof TextValue) {
                TextValue tv = (TextValue)child;
                sw.writeElementText(tv.getText());
            }
        }
View Full Code Here

Examples of org.apache.garbage.tree.ProcessingInstruction

    default:
      jj_la1[13] = jj_gen;
      ;
    }
    jj_consume_token(T_PROCINSTR_END);
    events.append(new ProcessingInstruction(this, target, data));
  }
View Full Code Here

Examples of org.apache.xmlbeans.xml.stream.ProcessingInstruction

                }

                break;

            case XMLEvent.PROCESSING_INSTRUCTION:
                ProcessingInstruction procInstr = (ProcessingInstruction) xe;

                context.procInst(procInstr.getTarget(), procInstr.getData());

                if (lineNums)
                    lineNumber(xe, context);

                break;
View Full Code Here

Examples of org.castor.xmlctf.xmldiff.xml.nodes.ProcessingInstruction

     * @param data the content of the processing instruction
     * @throws org.xml.sax.SAXException never
     */
    public void processingInstruction(final String target, final String data)
                                                  throws org.xml.sax.SAXException {
        ProcessingInstruction pi = new ProcessingInstruction(target, data);
        _currentNode.addChild(pi);
    }
View Full Code Here

Examples of org.dom4j.ProcessingInstruction

                    result.add(attr);
                }
            }
        }
        else if (node instanceof ProcessingInstruction) {
            ProcessingInstruction pi = (ProcessingInstruction)node;
            if ("target".equals(localName)) {
                result.add(new DefaultAttribute("target", pi.getTarget()));
            }
            else if ("data".equals(localName)) {
                result.add(new DefaultAttribute("data", pi.getText()));
            }
            else {
                result.add(new DefaultAttribute(localName, pi.getValue(localName)));
            }
        } else if (node instanceof DocumentType) {
            DocumentType doctype = (DocumentType)node;
            if ("publicId".equals(localName)) {
                result.add(new DefaultAttribute("publicId", doctype.getPublicID()));
View Full Code Here

Examples of org.dom4j.ProcessingInstruction

        protected void runTest() throws Exception {
            jct.createContext().compileScript(jelly);
            Document dom = new SAXReader().read(jelly);
            checkLabelFor(dom);
            if (requirePI) {
                ProcessingInstruction pi = dom.processingInstruction("jelly");
                if (pi==null || !pi.getText().contains("escape-by-default"))
                    throw new AssertionError("<?jelly escape-by-default='true'?> is missing");

            }
            // TODO: what else can we check statically? use of taglibs?
        }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.ProcessingInstruction

     * <!-- end-user-doc -->
     * @generated
     */
    public ProcessingInstruction popProcessingInstruction(ProcessingInstructionStackFrame processingInstruction)
    {
      ProcessingInstruction resultProcessingInstructionValue = processingInstruction.popProcessingInstruction();
      this.processingInstruction = processingInstruction;
      return resultProcessingInstructionValue;
    }
View Full Code Here

Examples of org.jdom.ProcessingInstruction

        }
        this.document.setDocType(docType);
    }

    public void writePI(String target, String data) throws IOException {
        this.currentElement.addContent(new ProcessingInstruction(target, data));
    }
View Full Code Here

Examples of org.jdom.ProcessingInstruction

                if(attr != null) {
                    result.add(attr);
                }
            }
        } else if (node instanceof ProcessingInstruction) {
            ProcessingInstruction pi = (ProcessingInstruction)node;
            if ("target".equals(localName)) {
                result.add(new Attribute("target", pi.getTarget()));
            }
            else if ("data".equals(localName)) {
                result.add(new Attribute("data", pi.getData()));
            }
            else {
                result.add(new Attribute(localName, pi.getValue(localName)));
            }
        } else if (node instanceof DocType) {
            DocType doctype = (DocType)node;
            if ("publicId".equals(localName)) {
                result.add(new Attribute("publicId", doctype.getPublicID()));
View Full Code Here

Examples of org.jdom.ProcessingInstruction

    public void startDocument() {
        _sb.append("<?xml version=\"1.0\" encoding=\"" + _encoding + "\"?>\n");

        List pis = _dom.getDoc().getContent(new ContentFilter(ContentFilter.PI));
        for (Iterator it = pis.iterator(); it.hasNext();) {
            ProcessingInstruction pi = (ProcessingInstruction) it.next();
            _sb.append("<?" + pi.getTarget() + " " + pi.getValue() + "?>\n");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.