public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { setDocType(systemId); return super.resolveEntity(publicId, systemId); } }
public EclipseFragmentXMLValidator(SchemaFactory schemaFactory) throws IOException, SAXException { super.setSchemaFactory(schemaFactory); super.setSchemaSourceResolver(new SchemaResolver()); }
/** * Parse the XML stream and return the associated W3C Document object. * * @param stream The stream to be parsed. * @param validation Validation type to be carried out on the document. * @param expandEntityRefs Expand entity References as per * {@link DocumentBuilderFactory#setExpandEntityReferences(boolean)}. * @return The W3C Document object associated with the input stream. */ public static Document parseStream(InputStream stream, VALIDATION_TYPE validation, boolean expandEntityRefs) throws SAXException, IOException { return parseStream(stream, new LocalDTDEntityResolver(), validation, expandEntityRefs); }
/** * Serialise the supplied W3C DOM subtree. * <p/> * The output is unformatted. * * @param nodeList The DOM subtree as a NodeList. * @return The subtree in serailised form. * @throws DOMException Unable to serialise the DOM. */ public static String serialize(NodeList nodeList) throws DOMException { return serialize(nodeList, false); }
/** * Get attribute value, returning <code>null</code> if unset. * <p/> * Some DOM implementations return an empty string for an unset * attribute. * @param element The DOM element. * @param attributeName The attribute to get. * @return The attribute value, or <code>null</code> if unset. */ public static String getAttributeValue(Element element, String attributeName) { return getAttributeValue(element, attributeName, null); }
/** * Basic DOM namespace aware parse. * @param stream Document stream. * @return Document instance. */ public static Document parseStream(Reader stream) throws ParserConfigurationException, IOException, SAXException { return XmlUtil.parseStream(stream, null); }
public EclipseFragmentXMLValidator() throws IOException, SAXException { super.setSchemaSourceResolver(new SchemaResolver()); }
/** * Replace one node with a list of nodes. * <p/> * Clones the NodeList elements. * @param newNodes New nodes - added in same location as oldNode. * @param oldNode Old node - removed. */ public static void replaceNode(NodeList newNodes, Node oldNode) { replaceNode(newNodes, oldNode, true); }
/** * Get the parent element of the supplied element having the * specified tag name. * @param child Child element. * @param parentLocalName Parent element local name. * @return The first parent element of "child" having the tagname "parentName", * or null if no such parent element exists. */ public static Element getParentElement(Element child, String parentLocalName) { return getParentElement(child, parentLocalName, null); }
/** * Create an element with the specified name. * @param localPart The localPart name. * @return Element instance. */ public static Element createElement(String localPart) { return createElementNS(XMLConstants.NULL_NS_URI, localPart); }
/** * Parse the XML stream and return the associated W3C Document object. * * @param stream The stream to be parsed. * @param validation Validation type to be carried out on the document. * @param expandEntityRefs Expand entity References as per * {@link DocumentBuilderFactory#setExpandEntityReferences(boolean)}. * @return The W3C Document object associated with the input stream. */ public static Document parseStream(InputStream stream, VALIDATION_TYPE validation, boolean expandEntityRefs) throws SAXException, IOException { return parseStream(stream, new LocalDTDEntityResolver(), validation, expandEntityRefs); }
/** * Serialise the supplied W3C DOM subtree. * <p/> * The output is unformatted. * * @param nodeList The DOM subtree as a NodeList. * @return The subtree in serailised form. * @throws DOMException Unable to serialise the DOM. */ public static String serialize(NodeList nodeList) throws DOMException { return serialize(nodeList, false); }
/** * Get attribute value, returning <code>null</code> if unset. * <p/> * Some DOM implementations return an empty string for an unset * attribute. * @param element The DOM element. * @param attributeName The attribute to get. * @return The attribute value, or <code>null</code> if unset. */ public static String getAttributeValue(Element element, String attributeName) { return getAttributeValue(element, attributeName, null); }
public EclipseFragmentXMLValidator(SchemaFactory schemaFactory) throws IOException, SAXException { super.setSchemaFactory(schemaFactory); super.setSchemaSourceResolver(new SchemaResolver()); }
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { setDocType(systemId); return super.resolveEntity(publicId, systemId); } }
public EclipseFragmentXMLValidator() throws IOException, SAXException { super.setSchemaSourceResolver(new SchemaResolver()); }
/** * Parse the XML stream and return the associated W3C Document object. * * @param stream The stream to be parsed. * @param validation Validation type to be carried out on the document. * @param expandEntityRefs Expand entity References as per * {@link DocumentBuilderFactory#setExpandEntityReferences(boolean)}. * @return The W3C Document object associated with the input stream. */ public static Document parseStream(InputStream stream, VALIDATION_TYPE validation, boolean expandEntityRefs) throws SAXException, IOException { return parseStream(stream, new LocalDTDEntityResolver(), validation, expandEntityRefs); }
public EclipseFragmentXMLValidator(SchemaFactory schemaFactory) throws IOException, SAXException { super.setSchemaFactory(schemaFactory); super.setSchemaSourceResolver(new SchemaResolver()); }
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { setDocType(systemId); return super.resolveEntity(publicId, systemId); } }
public EclipseFragmentXMLValidator() throws IOException, SAXException { super.setSchemaSourceResolver(new SchemaResolver()); }