dk.brics.xact.operations
Class XMLParser
java.lang.Object
dk.brics.xact.operations.XMLParser
public class XMLParser
- extends Object
Parser for XML templates.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parse
public static XML parse(InputStream in,
String encoding,
boolean template,
Map<String,String> namespaces,
Origin origin)
throws IOException
- Parses the given XML template or document from its textual representation.
If
template
is set, the global and thread local namespace declarations apply, and gaps are recognized.
If namespaces
is non-null, this map overrides the global and thread local namespace declarations.
- Throws:
IOException
- if an I/O error occurs
XMLTemplateException
- if the string is not a syntactically wellformed XML template or document
wrapAndConvertGaps
static String wrapAndConvertGaps(InputStream in,
String encoding,
boolean template,
Map<String,String> namespaces)
throws XMLException,
IOException
- Throws:
XMLException
IOException
Copyright © 2005-2008 Aarhus University.