public String getAttributeValue( String namespace, String name ) throw new IndexOutOfBoundsException( "only START_TAG can have attributes" + getPositionDescription() ); if ( name == null )
public void require( int type, String namespace, String name ) throws XmlPullParserException, IOException { if ( processNamespaces == false && namespace != null ) { throw new XmlPullParserException( "processing namespaces must be enabled on parser (or factory)" + " to have possible namespaces declared on elements" + ( " (position:" + getPositionDescription() ) + ")" ); } if ( type != getEventType() || ( namespace != null && !namespace.equals( getNamespace() ) ) || ( name != null && !name.equals( getName() ) ) ) { throw new XmlPullParserException( "expected event " + TYPES[type] + ( name != null ? " with name '" + name + "'" : "" ) + ( namespace != null && name != null ? " and" : "" ) + ( namespace != null ? " with namespace '" + namespace + "'" : "" ) + " but got" + ( type != getEventType() ? " " + TYPES[getEventType()] : "" ) + ( name != null && getName() != null && !name.equals( getName() ) ? " name '" + getName() + "'" : "" ) + ( namespace != null && name != null && getName() != null && !name.equals( getName() ) && getNamespace() != null && !namespace.equals( getNamespace() ) ? " and" : "" ) + ( namespace != null && getNamespace() != null && !namespace.equals( getNamespace() ) ? " namespace '" + getNamespace() + "'" : "" ) + ( " (position:" + getPositionDescription() ) + ")" ); } }
"only START_TAG can have attributes"+getPositionDescription()); if(name == null) { throw new IllegalArgumentException("attribute name can not be null");
+expectedTagStack.toString()+getPositionDescription());
"processing namespaces must be enabled on parser (or factory)"+ " to have possible namespaces delcared on elements" +(" (postion:"+ getPositionDescription())+")");
final String pos = parser.getPositionDescription(); Logs.warn( "Expected TEXT, not XML: {}", pos, new Throwable() ); parser.skipSubTree();