Package org.robwork.sdurw_core
Class DOMParser
- java.lang.Object
-
- org.robwork.sdurw_core.DOMParser
-
public class DOMParser extends java.lang.Object
interface for parsing documents in a DOM fasion.
The factory method in the DOM parser enables extensions to be added by the user through
plugins.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DOMParser.Factory
a factory for DOMParsers.
-
Constructor Summary
Constructors Constructor Description DOMParser(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(DOMParser obj)
DOMElemPtr
getRootElement()
get the top/root element in the DOM structurevoid
load(java.lang.String filename)
parse from filevoid
load(SWIGTYPE_p_std__istream input)
parse from streamstatic DOMParserPtr
make()
make an instance of the default DOM parservoid
save(java.lang.String filename)
save DOM structure to filevoid
save(SWIGTYPE_p_std__ostream input)
save DOM structure to streamvoid
setDebug(boolean debug)
Enable/disable debugging to the debug Log.void
setSchema(java.lang.String filename)
specify the schema file
Note: not all DOMParser implementations support schema validation
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(DOMParser obj)
-
delete
public void delete()
-
load
public void load(java.lang.String filename)
parse from file- Parameters:
filename
- [in] name of file
-
load
public void load(SWIGTYPE_p_std__istream input)
parse from stream- Parameters:
input
- [in] input stream
-
save
public void save(java.lang.String filename)
save DOM structure to file- Parameters:
filename
- [in] filename
-
save
public void save(SWIGTYPE_p_std__ostream input)
save DOM structure to stream- Parameters:
input
-
-
setSchema
public void setSchema(java.lang.String filename)
specify the schema file
Note: not all DOMParser implementations support schema validation- Parameters:
filename
-
-
getRootElement
public DOMElemPtr getRootElement()
get the top/root element in the DOM structure- Returns:
- root element of dom structure
-
setDebug
public void setDebug(boolean debug)
Enable/disable debugging to the debug Log.- Parameters:
debug
- [in] true to enable debug output.
-
make
public static DOMParserPtr make()
make an instance of the default DOM parser- Returns:
- a DOM parser for xml files
-
-