lifecycleConfiguration = parseLifecycleConfiguration( parser, strict ); lifecycleConfiguration.setModelEncoding( parser.getInputEncoding() ); parsed = true;
lifecycleConfiguration = parseLifecycleConfiguration( parser, strict ); lifecycleConfiguration.setModelEncoding( parser.getInputEncoding() ); parsed = true;
/** * Method read. * * @param parser * @param strict * @throws IOException * @throws XmlPullParserException * @return LifecycleConfiguration */ private LifecycleConfiguration read( XmlPullParser parser, boolean strict ) throws IOException, XmlPullParserException { int eventType = parser.getEventType(); while ( eventType != XmlPullParser.END_DOCUMENT ) { if ( eventType == XmlPullParser.START_TAG ) { if ( strict && ! "lifecycles".equals( parser.getName() ) ) { throw new XmlPullParserException( "Expected root element 'lifecycles' but found '" + parser.getName() + "'", parser, null ); } LifecycleConfiguration lifecycleConfiguration = parseLifecycleConfiguration( parser, strict ); lifecycleConfiguration.setModelEncoding( parser.getInputEncoding() ); return lifecycleConfiguration; } eventType = parser.next(); } throw new XmlPullParserException( "Expected root element 'lifecycles' but found no element at all: invalid XML document", parser, null ); } //-- LifecycleConfiguration read( XmlPullParser, boolean )
return parseLifecycleConfiguration( "lifecycles", parser, strict );