Iterator i = parseRequestContent(E_UPDATE).getChildren().iterator();
while( i.hasNext() ) {
Element e = (Element)i.next();
if( e.getName().equals(E_VERSION) ) {
if( updateSourcePath != null ) {
throw new JDOMException("At most one <"+E_VERSION+"> element allowed" );
}
if (updateLabelName != null) {
throw new JDOMException("Either a <"+E_VERSION+"> OR a <"+E_LABEL_NAME+"> element allowed");
}
// get the href element
ve = e;
try {
Element hre = (Element)ve.getChildren().get(0);
if( hre == null || !hre.getName().equals(E_HREF) )
throw new Exception();
updateSourcePath = getSlidePath( hre.getText() );
}
catch( Exception x ) {
throw new JDOMException("<"+E_VERSION+"> element must contain <"+E_HREF+"> element" );
}
}
if( e.getName().equals(E_PROP) ) {
if( requestedProps != null ) {
throw new JDOMException("At most one "+E_PROP+" element allowed" );
}
requestedProps = new RequestedPropertiesImpl( e );
}
if( e.getName().equals(E_LABEL_NAME) ) {
if (updateSourcePath != null) {
throw new JDOMException("Either a <"+E_VERSION+"> OR a <"+E_LABEL_NAME+"> element allowed");
}
if( updateLabelName != null ) {
throw new JDOMException("At most one <"+E_LABEL_NAME+"> element allowed" );
}
updateLabelName = e.getText();
}
}
}