use of org.apache.axiom.core.stream.StreamException in project webservices-axiom by apache.
the class Serializer method startDTD.
public void startDTD(String name, String publicId, String systemId) throws StreamException {
inDoctype = true;
try {
writer.write("<!DOCTYPE ");
writer.write(name);
if (publicId != null) {
writer.write(" PUBLIC \"");
writer.write(publicId);
writer.write('\"');
}
if (systemId != null) {
if (publicId == null) {
writer.write(" SYSTEM \"");
} else {
writer.write(" \"");
}
writer.write(systemId);
writer.write('\"');
}
} catch (IOException ex) {
throw new StreamException(ex);
}
}
use of org.apache.axiom.core.stream.StreamException in project webservices-axiom by apache.
the class Serializer method startComment.
@Override
public void startComment() throws StreamException {
closeStartTag();
try {
writer.write("<!--");
} catch (IOException ex) {
throw new StreamException(ex);
}
switchContext(COMMENT);
}
use of org.apache.axiom.core.stream.StreamException in project webservices-axiom by apache.
the class Serializer method closeStartTag.
/**
* For the enclosing elements starting tag write out
* out any attributes followed by ">"
*
* @throws StreamException
*/
private void closeStartTag() throws StreamException {
if (startTagOpen) {
try {
writer.write('>');
switchContext(MIXED_CONTENT);
} catch (IOException ex) {
throw new StreamException(ex);
}
startTagOpen = false;
}
}
Aggregations