Package org.jdom

Examples of org.jdom.ProcessingInstruction


                  element.addContent(new EntityRef(er.getName(), er.getDeclaration().getPublicId(), er.getDeclaration().getSystemId()));
                break;
 
              case XMLStreamConstants.PROCESSING_INSTRUCTION:
                javax.xml.stream.events.ProcessingInstruction pi = (javax.xml.stream.events.ProcessingInstruction)currentEvent;
                  element.addContent(new ProcessingInstruction(pi.getTarget(), pi.getData()));
                  break;
 
              case XMLStreamConstants.START_ELEMENT:
               
                element.addContent(readElement());
View Full Code Here


        return buf.toString();
    }

    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

        return buf.toString();
    }

    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

        return buf.toString();
    }

    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

  @Override
  public void serialize( @NotNull T object, @NotNull OutputStream out, @Nullable C context ) throws IOException {
    Document document = new Document();
    //Add the format version
    document.addContent( new ProcessingInstruction( PI_TARGET_FORMAT, getFormatVersion().toString() ) );

    //Create the root
    Element root = new Element( getDefaultElementName() );
    document.setRootElement( root );
View Full Code Here

  @NotNull
  public T deserialize( @NotNull InputStream in, @Nullable C context ) throws IOException, VersionMismatchException {
    try {
      Document document = new SAXBuilder().build( in );

      ProcessingInstruction processingInstruction = getFormatInstruction( document );

      Version formatVersion = parseVersion( processingInstruction );

      Version.verifyMatch( getFormatVersion(), formatVersion );
View Full Code Here

            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

TOP

Related Classes of org.jdom.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.