use of org.hl7.fhir.utilities.xml.XMLWriter in project org.hl7.fhir.core by hapifhir.
the class XmlParserBase method compose.
/**
* Compose a resource to a stream, possibly using pretty presentation for a human reader, and maybe a different choice in the xhtml narrative (used in the spec in one place, but should not be used in production)
* @
*/
public void compose(OutputStream stream, Resource resource, boolean htmlPretty) throws IOException {
XMLWriter writer = new XMLWriter(stream, "UTF-8");
writer.setPretty(style == OutputStyle.PRETTY);
writer.start();
compose(writer, resource, htmlPretty);
writer.end();
}
use of org.hl7.fhir.utilities.xml.XMLWriter in project org.hl7.fhir.core by hapifhir.
the class XmlParserBase method compose.
/**
* Compose a resource to a stream, possibly using pretty presentation for a human reader (used in the spec, for example, but not normally in production)
* @
*/
@Override
public void compose(OutputStream stream, Resource resource) throws IOException {
XMLWriter writer = new XMLWriter(stream, "UTF-8");
writer.setPretty(style == OutputStyle.PRETTY);
writer.start();
compose(writer, resource, writer.isPretty());
writer.end();
}
use of org.hl7.fhir.utilities.xml.XMLWriter in project org.hl7.fhir.core by hapifhir.
the class XmlParser method compose.
@Override
public void compose(Element e, OutputStream stream, OutputStyle style, String base) throws IOException {
XMLWriter xml = new XMLWriter(stream, "UTF-8");
xml.setPretty(style == OutputStyle.PRETTY);
xml.start();
xml.setDefaultNamespace(e.getProperty().getNamespace());
composeElement(xml, e, e.getType());
xml.end();
}
use of org.hl7.fhir.utilities.xml.XMLWriter in project org.hl7.fhir.core by hapifhir.
the class XmlParserBase method compose.
/**
* Compose a resource to a stream, possibly using pretty presentation for a human reader, and maybe a different choice in the xhtml narrative (used in the spec in one place, but should not be used in production)
* @
*/
public void compose(OutputStream stream, Resource resource, boolean htmlPretty) throws IOException {
XMLWriter writer = new XMLWriter(stream, "UTF-8", version == XmlVersion.V1_1);
writer.setPretty(style == OutputStyle.PRETTY);
writer.start();
compose(writer, resource, htmlPretty);
writer.end();
}
use of org.hl7.fhir.utilities.xml.XMLWriter in project org.hl7.fhir.core by hapifhir.
the class XmlParserBase method compose.
/**
* Compose a resource to a stream, possibly using pretty presentation for a human reader (used in the spec, for example, but not normally in production)
* @
*/
@Override
public void compose(OutputStream stream, Resource resource) throws IOException {
XMLWriter writer = new XMLWriter(stream, "UTF-8", version == XmlVersion.V1_1);
writer.setPretty(style == OutputStyle.PRETTY);
writer.start();
compose(writer, resource, writer.isPretty());
writer.end();
}
Aggregations