/** * Skips the current element. * * @throws Exception the exception */ public void skipCurrentElement() throws Exception { this.skipElement(this.getNamespacePrefix(), this.getLocalName()); }
/** * Determines whether current element is a start element. * * @param xmlNamespace the xml namespace * @param localName the local name * @return true for matching start element; false otherwise. */ public boolean isStartElement(XmlNamespace xmlNamespace, String localName) { return this.isStartElement() && StringUtils.equals(getLocalName(), localName) && ( StringUtils.equals(getNamespacePrefix(), EwsUtilities.getNamespacePrefix(xmlNamespace)) || StringUtils.equals(getNamespaceUri(), EwsUtilities.getNamespaceUri(xmlNamespace))); }
/** * Read element value. * * @return String * @throws Exception the exception */ public String readElementValue() throws Exception { this.ensureCurrentNodeIsStartElement(); return this.readElementValue(this.getNamespacePrefix(), this .getLocalName()); }
/** * Read XML element. * * @param namespacePrefix The namespace prefix * @param localName Name of the local * @param nodeType Type of the node * @throws Exception the exception */ private void internalReadElement(String namespacePrefix, String localName, XmlNodeType nodeType) throws Exception { read(nodeType); if ((!this.getLocalName().equals(localName)) || (!this.getNamespacePrefix().equals(namespacePrefix))) { throw new ServiceXmlDeserializationException(String.format( "An element node '%s:%s' of the type %s was expected, but node '%s' of type %s was found.", namespacePrefix, localName, nodeType.toString(), this.getName(), this.getNodeType() .toString())); } }
/** * Skips the current element. * * @throws Exception the exception */ public void skipCurrentElement() throws Exception { this.skipElement(this.getNamespacePrefix(), this.getLocalName()); }
/** * Determines whether current element is a start element. * * @param xmlNamespace the xml namespace * @param localName the local name * @return true for matching start element; false otherwise. */ public boolean isStartElement(XmlNamespace xmlNamespace, String localName) { return this.isStartElement() && StringUtils.equals(getLocalName(), localName) && ( StringUtils.equals(getNamespacePrefix(), EwsUtilities.getNamespacePrefix(xmlNamespace)) || StringUtils.equals(getNamespaceUri(), EwsUtilities.getNamespaceUri(xmlNamespace))); }
/** * Read element value. * * @return String * @throws Exception the exception */ public String readElementValue() throws Exception { this.ensureCurrentNodeIsStartElement(); return this.readElementValue(this.getNamespacePrefix(), this .getLocalName()); }
/** * Read XML element. * * @param namespacePrefix The namespace prefix * @param localName Name of the local * @param nodeType Type of the node * @throws Exception the exception */ private void internalReadElement(String namespacePrefix, String localName, XmlNodeType nodeType) throws Exception { read(nodeType); if ((!this.getLocalName().equals(localName)) || (!this.getNamespacePrefix().equals(namespacePrefix))) { throw new ServiceXmlDeserializationException(String.format( "An element node '%s:%s' of the type %s was expected, but node '%s' of type %s was found.", namespacePrefix, localName, nodeType.toString(), this.getName(), this.getNodeType() .toString())); } }