Class GenericXMLSchemaBasedWriter
java.lang.Object
de.uni_trier.wi2.procake.utils.io.xerces.GenericXMLSchemaBasedWriter
A XMLWriter for XML content based on a XML Schema grammar. The XML Schema location can be defined
with
addSchemaLocation(String, String)
, the target namespace can be defined with
setTargetNamespace(String)
, and namespace imports can be added with
addImport(String, String)
.- Author:
- Rainer Maximini, Maximilian Hoffmann
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGenericXMLSchemaBasedWriter
(OutputStream out, String encoding) GenericXMLSchemaBasedWriter
(String filename, String encoding) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(String name, String value) void
The prefix should not contain any ":"void
addSchemaLocation
(String uri, String location) void
void
appendElement
(String prefix, String tagName) Simplified call ofappendElement(String, String, boolean)
, with no empty element.void
appendElement
(String prefix, String tagName, boolean emptyElement) void
close()
void
void
finishElement
(boolean emptyElement) void
setTargetNamespace
(String targetNamespace)
-
Field Details
-
HTTP_WWW_W_3_ORG_2001_XMLSCHEMA_INSTANCE
- See Also:
-
-
Constructor Details
-
GenericXMLSchemaBasedWriter
-
GenericXMLSchemaBasedWriter
- Throws:
IOException
-
-
Method Details
-
addImport
The prefix should not contain any ":"- Parameters:
prefix
- The prefix of the importuri
- The URI of the import
-
appendElement
Simplified call ofappendElement(String, String, boolean)
, with no empty element.- Parameters:
prefix
-tagName
-- Throws:
IOException
-
appendElement
- Throws:
IOException
-
addSchemaLocation
-
setTargetNamespace
-
close
- Throws:
IOException
-
addAttribute
- Throws:
IOException
-
finishElement
- Throws:
IOException
-
finishElement
- Throws:
IOException
-
addText
- Throws:
IOException
-