| Package | Description |
|---|---|
| com.cloudhopper.sxmp |
| Modifier and Type | Method and Description |
|---|---|
static DeliverResponse |
SxmpSender.deliver(String url,
DeliverRequest request,
boolean shouldParseResponse) |
Operation |
SxmpParser.parse(InputStream in)
public Node parse(InputSource source) throws IOException, SAXException {
// _dtd=null;
Handler handler = new Handler();
XMLReader reader = _parser.getXMLReader();
reader.setContentHandler(handler);
reader.setErrorHandler(handler);
reader.setEntityResolver(handler);
if (logger.isDebugEnabled())
logger.debug("parsing: sid=" + source.getSystemId() + ",pid=" + source.getPublicId());
_parser.parse(source, handler);
if (handler.error != null)
throw handler.error;
Node root = (Node)handler.root;
handler.reset();
return root;
}
public synchronized Node parse(String xml) throws IOException, SAXException {
ByteArrayInputStream is = new ByteArrayInputStream(xml.getBytes());
return parse(is);
}
public synchronized Node parse(File file) throws IOException, SAXException {
return parse(new InputSource(file.toURI().toURL().toString()));
}
public synchronized Node parse(InputStream in) throws IOException, SAXException {
//_dtd=null;
Handler handler = new Handler();
XMLReader reader = _parser.getXMLReader();
reader.setContentHandler(handler);
reader.setErrorHandler(handler);
reader.setEntityResolver(handler);
_parser.parse(new InputSource(in), handler);
if (handler.error != null)
throw handler.error;
Node root = (Node)handler.root;
handler.reset();
return root;
}
|
static Response |
SxmpSender.send(String url,
Request request,
boolean shouldParseResponse) |
static SubmitResponse |
SxmpSender.submit(String url,
SubmitRequest request) |
Copyright © 2016. All rights reserved.