/** * Returns the concatenated child text of the specified node. * This method only looks at the immediate children of type * <code>Node.TEXT_NODE</code> or the children of any child * node that is of type <code>Node.CDATA_SECTION_NODE</code> * for the concatenation. * * @param node The node to look at. */ public static String getChildText(Node node) { // is there anything to do? if (node == null) { return null; } // concatenate children text StringBuffer str = new StringBuffer(); Node child = node.getFirstChild(); while (child != null) { short type = child.getNodeType(); if (type == Node.TEXT_NODE) { str.append(child.getNodeValue()); } else if (type == Node.CDATA_SECTION_NODE) { str.append(getChildText(child)); } child = child.getNextSibling(); } // return text value return str.toString(); } // getChildText(Node):String
/** * build method taking in a document and a validation handler * @param doc * @param uri * @param veh */ XmlSchema build(Document doc, String uri, ValidationEventHandler veh) { Element schemaEl = doc.getDocumentElement(); XmlSchema xmlSchema = handleXmlSchemaElement(schemaEl, uri); xmlSchema.setInputEncoding(DOMUtil.getInputEncoding(doc)); return xmlSchema; }
/** * Read an XML Schema into the collection from a DOM element. Schemas in a collection * must be unique in the concatentation of System ID and targetNamespace. The system ID will * be empty for this API. * @param elem the DOM element for the schema. * @return the XmlSchema */ public XmlSchema read(Element elem) { SchemaBuilder builder = new SchemaBuilder(this, null); XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, null); xmlSchema.setInputEncoding(DOMUtil.getXmlEncoding(elem.getOwnerDocument())); return xmlSchema; }
operationName = DOMUtil.getFirstChildElement(saajSoapMessage.getSOAPBody()).getLocalName(); } catch (SOAPException e) { LOGGER.debug("Access to web service denied for user '{}': SOAP error: {}",
/** * Read an XML Schema into the collection from a DOM element. Schemas in a collection * must be unique in the concatentation of System ID and targetNamespace. The system ID will * be empty for this API. * @param elem the DOM element for the schema. * @return the XmlSchema */ public XmlSchema read(Element elem) { SchemaBuilder builder = new SchemaBuilder(this, null); XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, null); xmlSchema.setInputEncoding(DOMUtil.getXmlEncoding(elem.getOwnerDocument())); return xmlSchema; }
/** * build method taking in a document and a validation handler * @param doc * @param uri * @param veh */ XmlSchema build(Document doc, String uri, ValidationEventHandler veh) { Element schemaEl = doc.getDocumentElement(); XmlSchema xmlSchema = handleXmlSchemaElement(schemaEl, uri); xmlSchema.setInputEncoding(DOMUtil.getInputEncoding(doc)); return xmlSchema; }
/** * Returns the concatenated child text of the specified node. * This method only looks at the immediate children of type * <code>Node.TEXT_NODE</code> or the children of any child * node that is of type <code>Node.CDATA_SECTION_NODE</code> * for the concatenation. * * @param node The node to look at. */ public static String getChildText(Node node) { // is there anything to do? if (node == null) { return null; } // concatenate children text StringBuffer str = new StringBuffer(); Node child = node.getFirstChild(); while (child != null) { short type = child.getNodeType(); if (type == Node.TEXT_NODE) { str.append(child.getNodeValue()); } else if (type == Node.CDATA_SECTION_NODE) { str.append(getChildText(child)); } child = child.getNextSibling(); } // return text value return str.toString(); } // getChildText(Node):String
/** * build method taking in a document and a validation handler * @param doc * @param uri * @param veh */ XmlSchema build(Document doc, String uri, ValidationEventHandler veh) { Element schemaEl = doc.getDocumentElement(); XmlSchema xmlSchema = handleXmlSchemaElement(schemaEl, uri); xmlSchema.setInputEncoding(DOMUtil.getInputEncoding(doc)); return xmlSchema; }
/** * Returns the concatenated child text of the specified node. * This method only looks at the immediate children of type * <code>Node.TEXT_NODE</code> or the children of any child * node that is of type <code>Node.CDATA_SECTION_NODE</code> * for the concatenation. * * @param node The node to look at. */ public static String getChildText(Node node) { // is there anything to do? if (node == null) { return null; } // concatenate children text StringBuffer str = new StringBuffer(); Node child = node.getFirstChild(); while (child != null) { short type = child.getNodeType(); if (type == Node.TEXT_NODE) { str.append(child.getNodeValue()); } else if (type == Node.CDATA_SECTION_NODE) { str.append(getChildText(child)); } child = child.getNextSibling(); } // return text value return str.toString(); } // getChildText(Node):String
public XmlSchema read(Element elem, String uri) { SchemaBuilder builder = new SchemaBuilder(this, null); XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, null); xmlSchema.setInputEncoding(DOMUtil.getInputEncoding(elem.getOwnerDocument())); return xmlSchema; }
public XmlSchema read(Element elem) { SchemaBuilder builder = new SchemaBuilder(this, null); XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, null); xmlSchema.setInputEncoding(DOMUtil.getInputEncoding(elem.getOwnerDocument())); return xmlSchema; }
/** * Read a schema from a DOM tree into the collection. The schemas in a collection must be unique * in the concatenation of the target namespace and the system ID. * @param elem xs:schema DOM element. * @param systemId System id. * @return the schema object. */ public XmlSchema read(Element elem, String systemId) { SchemaBuilder builder = new SchemaBuilder(this, null); XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, systemId); xmlSchema.setInputEncoding(DOMUtil.getInputEncoding(elem.getOwnerDocument())); return xmlSchema; }
/** * Read a schema from a DOM tree into the collection. The schemas in a collection must be unique * in the concatenation of the target namespace and the system ID. * @param elem xs:schema DOM element. * @param systemId System id. * @return the schema object. */ public XmlSchema read(Element elem, String systemId) { SchemaBuilder builder = new SchemaBuilder(this, null); XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, systemId); xmlSchema.setInputEncoding(DOMUtil.getInputEncoding(elem.getOwnerDocument())); return xmlSchema; }
/** * Read an XML Schema from a complete XSD XML DOM Document into this collection. * Schemas in a collection must be unique in * the concatenation of SystemId and targetNamespace. * @param doc Source document. * @param systemId System id. * @param veh Stub for future capability to handle validation errors. * @param validator object that is called back to check validity of the target namespace. * @return the schema object. */ public XmlSchema read(Document doc, String systemId, ValidationEventHandler veh, TargetNamespaceValidator validator) { SchemaBuilder builder = new SchemaBuilder(this, validator); XmlSchema schema = builder.build(doc, systemId, veh); schema.setInputEncoding(DOMUtil.getInputEncoding(doc)); return schema; }
/** * Read an XML Schema from a complete XSD XML DOM Document into this collection. * Schemas in a collection must be unique in * the concatenation of SystemId and targetNamespace. * @param doc Source document. * @param systemId System id. * @param veh Stub for future capability to handle validation errors. * @param validator object that is called back to check validity of the target namespace. * @return the schema object. */ public XmlSchema read(Document doc, String systemId, ValidationEventHandler veh, TargetNamespaceValidator validator) { SchemaBuilder builder = new SchemaBuilder(this, validator); XmlSchema schema = builder.build(doc, systemId, veh); schema.setInputEncoding(DOMUtil.getInputEncoding(doc)); return schema; }