plugin/src/java/org/pm4knime/util/PetriNetUtil.java
public static Pnml importPnmlFromStream(InputStream input) throws XmlPullParserException, IOException {
		FullPnmlElementFactory pnmlFactory = new FullPnmlElementFactory();
		
		XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
		factory.setNamespaceAware(true);
		XmlPullParser xpp = factory.newPullParser();
		xpp.setInput(input, null);
		int eventType = xpp.getEventType();
		
		Pnml pnml = new Pnml();
		synchronized (pnmlFactory) {
			pnml.setFactory(pnmlFactory);

			/*
			 * Skip whatever we find until we've found a start tag.
			 */
			while (eventType != XmlPullParser.START_TAG) {
				eventType = xpp.next();
			}
			/*
			 * Check whether start tag corresponds to PNML start tag.
			 */
			if (xpp.getName().equals(Pnml.TAG)) {
				/*
				 * Yes it does. Import the PNML element.
				 */
				pnml.importElement(xpp, pnml);
			} else {
				/*
				 * No it does not. Return null to signal failure.
				 */
				pnml.log(Pnml.TAG, xpp.getLineNumber(), "Expected pnml");
			}
			if (pnml.hasErrors()) {
				return null;
			}
			return pnml;
		}
	}
// import the Petri net from a pnml file with the same transition id.
import the Petri net from a pnml file with the same transition id.
import the Petri net from a pnml file with the same transition id .
public static Pnml importPnmlFromStream(InputStream input) throws XmlPullParserException, IOException {
		FullPnmlElementFactory pnmlFactory = new FullPnmlElementFactory();
		XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
		factory.setNamespaceAware(true);
		XmlPullParser xpp = factory.newPullParser();
		xpp.setInput(input, null);
		int eventType = xpp.getEventType();
		Pnml pnml = new Pnml();
		synchronized (pnmlFactory) {
			pnml.setFactory(pnmlFactory);
			/*
			 * Skip whatever we find until we've found a start tag.
			 */
			while (eventType != XmlPullParser.START_TAG) {
				eventType = xpp.next();
			}
			/*
			 * Check whether start tag corresponds to PNML start tag.
			 */
			if (xpp.getName().equals(Pnml.TAG)) {
				/*
				 * Yes it does. Import the PNML element.
				 */
				pnml.importElement(xpp, pnml);
			} else {
				/*
				 * No it does not. Return null to signal failure.
				 */
				pnml.log(Pnml.TAG, xpp.getLineNumber(), "Expected pnml");
			}
			if (pnml.hasErrors()) {
				return null;
			}
			return pnml;
		}
	}
public static Pnml importPnmlFromStream ( InputStream input ) throws XmlPullParserException , IOException { FullPnmlElementFactory pnmlFactory = new FullPnmlElementFactory ( ) ; XmlPullParserFactory factory = XmlPullParserFactory . newInstance ( ) ; factory . setNamespaceAware ( true ) ; XmlPullParser xpp = factory . newPullParser ( ) ; xpp . setInput ( input , null ) ; int eventType = xpp . getEventType ( ) ; Pnml pnml = new Pnml ( ) ; synchronized ( pnmlFactory ) { pnml . setFactory ( pnmlFactory ) ; /*
			 * Skip whatever we find until we've found a start tag.
			 */ while ( eventType != XmlPullParser . START_TAG ) { eventType = xpp . next ( ) ; } /*
			 * Check whether start tag corresponds to PNML start tag.
			 */ if ( xpp . getName ( ) . equals ( Pnml . TAG ) ) { /*
				 * Yes it does. Import the PNML element.
				 */ pnml . importElement ( xpp , pnml ) ; } else { /*
				 * No it does not. Return null to signal failure.
				 */ pnml . log ( Pnml . TAG , xpp . getLineNumber ( ) , "Expected pnml" ) ; } if ( pnml . hasErrors ( ) ) { return null ; } return pnml ; } }
import the Petri net from a pnml file with the same transition id.
import the Petri net from a pnml file with the same transition id .