org.exolab.castor.xml.parsing
Class StrictElementHandler

java.lang.Object
  extended by org.exolab.castor.xml.parsing.StrictElementHandler

public class StrictElementHandler
extends Object

A helper class for UnmarshalHandler. Keeps track if elements, which appear in XML but for which there is no mapping, should be allowed.

Since:
1.3.2
Author:
Philipp Erlacher

Constructor Summary
StrictElementHandler()
           
 
Method Summary
 boolean areElementsIgnorable()
          Checks if extra elements will be ignored.
 void setIgnoreExtraElements(boolean ignoreExtraElems)
          Sets whether or not elements that do not match a specific field should simply be ignored or reported as an error.
 boolean skipElement()
          Skip element that appear in XML but for which we have no mapping
 boolean skipEndElement()
          Checks if an end element can be skipped.
 boolean skipStartElement()
          Checks if a start element can be skipped
 boolean skipStartElementIgnoringDepth()
          Checks if a start element can be skipped omitting current value of element depth.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrictElementHandler

public StrictElementHandler()
Method Detail

setIgnoreExtraElements

public void setIgnoreExtraElements(boolean ignoreExtraElems)
Sets whether or not elements that do not match a specific field should simply be ignored or reported as an error. By default, extra elements are ignored.

Parameters:
ignoreExtraElems - a boolean that when true will allow non-matched attributes to simply be ignored.

areElementsIgnorable

public boolean areElementsIgnorable()
Checks if extra elements will be ignored.

Returns:
true if we ignore extra elements, false otherwise

skipElement

public boolean skipElement()
Skip element that appear in XML but for which we have no mapping

Returns:

skipStartElement

public boolean skipStartElement()
Checks if a start element can be skipped

Returns:
true if start element can be skipped, false otherwise

skipStartElementIgnoringDepth

public boolean skipStartElementIgnoringDepth()
Checks if a start element can be skipped omitting current value of element depth.

Returns:
true if start element can be skipped, false otherwise

skipEndElement

public boolean skipEndElement()
Checks if an end element can be skipped.

Returns:
true if end element can be skipped, false otherwise


Copyright © 2013. All Rights Reserved.