Package org.jdom

Examples of org.jdom.ProcessingInstruction


  @Override
  public void serialize( @NotNull T object, @NotNull OutputStream out, @Nullable Lookup 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 Lookup 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

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.