Package org.robwork.sdurw_core
Class DOMParser
- java.lang.Object
-
- org.robwork.sdurw_core.DOMParser
-
public class DOMParser extends java.lang.Objectinterface 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 classDOMParser.Factorya 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 voiddelete()static longgetCPtr(DOMParser obj)DOMElemPtrgetRootElement()get the top/root element in the DOM structurevoidload(java.lang.String filename)parse from filevoidload(SWIGTYPE_p_std__istream input)parse from streamstatic DOMParserPtrmake()make an instance of the default DOM parservoidsave(java.lang.String filename)save DOM structure to filevoidsave(SWIGTYPE_p_std__ostream input)save DOM structure to streamvoidsetDebug(boolean debug)Enable/disable debugging to the debug Log.voidsetSchema(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
-
-