@Override protected void dtdInternal(String dtd) throws XMLStreamException { this.eventWriter.add(this.eventFactory.createDTD(dtd)); }
@Override protected void dtdInternal(String dtd) throws XMLStreamException { this.eventWriter.add(this.eventFactory.createDTD(dtd)); }
@Override public void writeDTD(String dtd) throws XMLStreamException { closeEmptyElementIfNecessary(); this.eventWriter.add(this.eventFactory.createDTD(dtd)); }
@Override public void writeDTD(String dtd) throws XMLStreamException { closeEmptyElementIfNecessary(); this.eventWriter.add(this.eventFactory.createDTD(dtd)); }
XMLEventFactory eventFactory = XMLEventFactory.newInstance(); XMLEvent dtd = eventFactory .createDTD("<!DOCTYPE Employee SYSTEM \"xmlValidate.dtd\">"); XMLInputFactory inFactory = XMLInputFactory.newInstance(); XMLOutputFactory outFactory = XMLOutputFactory.newInstance(); XMLEventReader reader = inFactory .createXMLEventReader(new StreamSource( "xmlValidate.xml")); reader = new DTDReplacer(reader, dtd); XMLEventWriter writer = outFactory.createXMLEventWriter(System.out); writer.add(reader); writer.flush(); // TODO error and proper stream handling
public void writeDTD(String dtd) throws XMLStreamException { eventWriter.add(eventFactory.createDTD(dtd)); }
/** * Constructs a STAX {@link DTD}event from a DOM4J {@link DocumentType}. * * @param docType * The {@link DocumentType}from which to construct the event. * * @return The constructed {@link DTD}event. * * @throws RuntimeException * DOCUMENT ME! */ public DTD createDTD(DocumentType docType) { StringWriter decl = new StringWriter(); try { docType.write(decl); } catch (IOException e) { throw new RuntimeException("Error writing DTD", e); } return factory.createDTD(decl.toString()); }
out.add(eventfactory.createDTD(sw.toString()));
public DTD createDTD(final String dtd) { return actual.createDTD(dtd); } }
/** * Creates and adds a {@link DTD} event. * * @param dtd The DTD content, as per * {@link XMLEventFactory#createDTD(String)}. * @throws XMLStreamException If an error occurs adding the event. */ public void addDTD(String dtd) throws XMLStreamException { add(factory.createDTD(dtd)); }
@Override protected void dtdInternal(String dtd) throws XMLStreamException { this.eventWriter.add(this.eventFactory.createDTD(dtd)); }
@Override protected void dtdInternal(String dtd) throws XMLStreamException { this.eventWriter.add(this.eventFactory.createDTD(dtd)); }
public void writeDTD(String arg0) throws XMLStreamException { addEvent(factory.createDTD(arg0)); }
public void writeDTD(String arg0) throws XMLStreamException { addEvent(factory.createDTD(arg0)); }
public void writeDTD(String arg0) throws XMLStreamException { addEvent(factory.createDTD(arg0)); }
public void writeDTD(String arg0) throws XMLStreamException { addEvent(factory.createDTD(arg0)); }
public void writeDTD(String arg0) throws XMLStreamException { addEvent(factory.createDTD(arg0)); }
public void writeDTD(String dtd) throws XMLStreamException { out.add(factory.createDTD(dtd)); }
@Override public void writeDTD(String dtd) throws XMLStreamException { closeEmptyElementIfNecessary(); this.eventWriter.add(this.eventFactory.createDTD(dtd)); }
@Override public void writeDTD(String dtd) throws XMLStreamException { closeEmptyElementIfNecessary(); this.eventWriter.add(this.eventFactory.createDTD(dtd)); }