litesoft
@ 151
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt package org.litesoft.testplan; import org.litesoft.GWT.client.dev.ui.actions.*; import org.litesoft.util.*; import org.litesoft.xml.*; public class ActionParserSetAttribute extends ActionParserBase { private static final String TAG_NAME = "SetAttribute"; private static final String ATTR_NAME = "name"; private static final String ATTR_VALUE = "value"; public ActionParserSetAttribute() { super( TAG_NAME ); } @Override public SetAttributeActionSpec parse( PullParserProxy pParser ) { pParser.validateIsStartTag( TAG_NAME ); String name = Utils.assertNotNullNotEmpty( TAG_NAME + ' ' + ATTR_NAME, pParser.getAttributeValue( ATTR_NAME ) ); String value = Utils.assertNotNullNotEmpty( TAG_NAME + ' ' + ATTR_VALUE, pParser.getAttributeValue( ATTR_VALUE ) ); pParser.validateNextIsEndTag( TAG_NAME ); return new SetAttributeActionSpec( name, value ); } } |