/** * 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())); } }
/** * Read XML element. * * @param xmlNamespace The XML namespace * @param localName Name of the local * @param nodeType Type of the node * @throws Exception the exception */ private void internalReadElement(XmlNamespace xmlNamespace, String localName, XmlNodeType nodeType) throws Exception { if (xmlNamespace == XmlNamespace.NotSpecified) { this.internalReadElement("", localName, nodeType); } else { this.read(nodeType); if ((!this.getLocalName().equals(localName)) || (!this.getNamespaceUri().equals(EwsUtilities .getNamespaceUri(xmlNamespace)))) { throw new ServiceXmlDeserializationException( String .format( "An element node '%s:%s' of the type %s was expected, but node '%s' of type %s was found.", EwsUtilities .getNamespacePrefix( xmlNamespace), localName, nodeType.toString(), this .getName(), this.getNodeType() .toString())); } } }
/** * 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())); } }
/** * Read XML element. * * @param xmlNamespace The XML namespace * @param localName Name of the local * @param nodeType Type of the node * @throws Exception the exception */ private void internalReadElement(XmlNamespace xmlNamespace, String localName, XmlNodeType nodeType) throws Exception { if (xmlNamespace == XmlNamespace.NotSpecified) { this.internalReadElement("", localName, nodeType); } else { this.read(nodeType); if ((!this.getLocalName().equals(localName)) || (!this.getNamespaceUri().equals(EwsUtilities .getNamespaceUri(xmlNamespace)))) { throw new ServiceXmlDeserializationException( String .format( "An element node '%s:%s' of the type %s was expected, but node '%s' of type %s was found.", EwsUtilities .getNamespacePrefix( xmlNamespace), localName, nodeType.toString(), this .getName(), this.getNodeType() .toString())); } } }