Examples of ProcessingInstruction


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

Examples of org.jdom.ProcessingInstruction

  private void findStyleSheet(Iterator descendants) {
    while(descendants != null && descendants.hasNext()) {
      Object o = descendants.next();
      if (o instanceof ProcessingInstruction) {
        ProcessingInstruction h = (ProcessingInstruction)o;
        try {
          styleSheet =  "<?" + h.getTarget() + " " + h.getValue() + "?>";
        } catch(Exception e) {
          try {
            new sos.scheduler.editor.app.ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , e);
          } catch(Exception ee) {
            //tu nichts
View Full Code Here

Examples of org.jdom.ProcessingInstruction

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

Examples of org.jdom.ProcessingInstruction

            else if (value instanceof Text || value instanceof CDATA) {
                String string = ((Text) value).getText();
                element.addContent(new Text(string));
            }
            else if (value instanceof ProcessingInstruction) {
                ProcessingInstruction pi =
                    (ProcessingInstruction) ((ProcessingInstruction) value)
                        .clone();
                element.addContent(pi);
            }
            else if (value instanceof Comment) {
View Full Code Here

Examples of org.jdom.ProcessingInstruction

      return nodeToElement(n);
    }
    if (n.getConstructorType() == Factory.Node_pi) {
      IString target = (IString) n.get(0);
      IString data = (IString) n.get(1);
      return new ProcessingInstruction(target.getValue(), data.getValue());
     
    }
    if (n.getConstructorType() == Factory.Node_charRef) {
      IInteger code = (IInteger) n.get(0);
      int c = java.lang.Integer.parseInt(code.getStringRepresentation());
View Full Code Here

Examples of org.jdom.ProcessingInstruction

      Comment comment = (Comment)content;
      IString data = vf.string(comment.getText());
      return vf.constructor(Factory.Node_comment, data);
    }
    if (content instanceof ProcessingInstruction) {
      ProcessingInstruction pi = (ProcessingInstruction)content;
      IString data = vf.string(pi.getData());
      return vf.constructor(Factory.Node_pi, data);
    }
    if (content instanceof EntityRef) {
      EntityRef er = (EntityRef)content;
      IString data = vf.string(er.getName());
View Full Code Here

Examples of org.jdom.ProcessingInstruction

                    text = txt.getText().trim();
                } else if (obj instanceof Comment) {
                    Comment com = (Comment) obj;
                    text = com.getText().trim();
                } else if (obj instanceof ProcessingInstruction) {
                    ProcessingInstruction pi = (ProcessingInstruction) obj;
                    text = pi.getData().trim();
                } else if (obj instanceof EntityRef) {
                    EntityRef er = (EntityRef) obj;
                    text = er.toString().trim();
                }
                if (StringUtils.isNotEmpty(text)) {
View Full Code Here

Examples of org.jdom.ProcessingInstruction

                    metadata.add(name, text.getText());
                } else if (node instanceof Comment) {
                    Comment com = (Comment) node;
                    metadata.add(name, com.getText());
                } else if (node instanceof ProcessingInstruction) {
                    ProcessingInstruction pi = (ProcessingInstruction) node;
                    metadata.add(name, pi.getData());
                } else if (node instanceof EntityRef) {
                    EntityRef er = (EntityRef) node;
                    metadata.add(name, er.toString());
                }
            }
View Full Code Here

Examples of org.jdom2.ProcessingInstruction

     *  very useful if you want to emit HTML directly into the stream.
     *
     */
    private void disableOutputEscaping()
    {
        addElement( new ProcessingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, "") );
    }
View Full Code Here

Examples of org.pdf4j.saxon.instruct.ProcessingInstruction

    protected String getErrorCodeForSelectPlusContent() {
        return "XTSE0880";
    }

    public Expression compile(Executable exec) throws XPathException {
        ProcessingInstruction inst = new ProcessingInstruction(name);
        compileContent(exec, inst, new StringLiteral(StringValue.SINGLE_SPACE));
        return inst;
    }
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.