public class XMLNodeUtilities extends Object implements XMLNodeUtilitiesOptions
XMLNodeUtilities2, class, all methods are static.ALLOW_INTERNAL_READERS, KEEP_LINE_NUMBERS, NAMESPACE_AWARE, PRESERVE_SPACE, SHOW_EXCEPTIONS, SHOW_WARNINGS| Modifier and Type | Method and Description |
|---|---|
static Charset |
getCharset()
Return the charset to use to write the content.
|
static EntityListResolver |
getEntityListResolver()
Return the EntityListResolver which can manage entity resolution in XML files.
|
static ErrorHandler |
getErrorHandler()
Return the error handler wich will be fired for parsing errors detected by the underlying parser. null by default.
|
static Map<String,Boolean> |
getFeatures()
Return the underlying parser factory features.
|
static XMLNode |
getNode(File file)
Return the Node from a file.
|
static XMLNode |
getNode(File file,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers)
Return the Node from a file.
|
static XMLNode |
getNode(File file,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the Node from a file.
|
static XMLNode |
getNode(File file,
int options)
Return the root Node from a file.
|
static XMLNode |
getNode(File file,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers)
Return the Node from a file.
|
static XMLNode |
getNode(Reader reader)
Return the root Node from a Reader.
|
static XMLNode |
getNode(Reader reader,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from a Reader.
|
static XMLNode |
getNode(Reader reader,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the Node from a Reader.
|
static XMLNode |
getNode(Reader reader,
int options)
Return the Node from a Reader.
|
static XMLNode |
getNode(Reader reader,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the Node from a Reader.
|
static XMLNode |
getNode(Reader reader,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the Node from a Reader.
|
static XMLNode |
getNode(String str)
Return the Node from a String.
|
static XMLNode |
getNode(String str,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers)
Return the Node from a String.
|
static XMLNode |
getNode(String str,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the Node from a String.
|
static XMLNode |
getNode(String str,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the Node from a String.
|
static XMLNode |
getNode(String str,
int options)
Return the Node from a String.
|
static XMLNode |
getNode(String str,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers)
Return the Node from a String.
|
static XMLNode |
getNode(URL url)
Return the Node from an URL.
|
static XMLNode |
getNode(URL xmlURL,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers)
Return the Node from an XML URL.
|
static XMLNode |
getNode(URL xmlURL,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the Node from an XML URL.
|
static XMLNode |
getNode(URL xmlURL,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the Node from an XML URL.
|
static XMLNode |
getNode(URL xmlURL,
int options)
Return the root Node from an XML URL.
|
static XMLNode |
getNode(URL xmlURL,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers)
Return the Node from an XML URL.
|
static XMLNode |
getNode(URL xmlURL,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the Node from an XML URL.
|
static Map<String,Object> |
getProperties()
Return the underlying parser properties.
|
static XMLRoot |
getRootNode(File file)
Return the root Node from a file.
|
static XMLRoot |
getRootNode(File file,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from a file.
|
static XMLRoot |
getRootNode(File file,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the root Node from a file.
|
static XMLRoot |
getRootNode(File file,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the root Node from a file.
|
static XMLRoot |
getRootNode(File file,
int options)
Return the root Node from a file.
|
static XMLRoot |
getRootNode(File file,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from a file.
|
static XMLRoot |
getRootNode(File file,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the root Node from a file.
|
static XMLRoot |
getRootNode(Reader reader)
Return the root Node from a Reader.
|
static XMLRoot |
getRootNode(Reader reader,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from a Reader.
|
static XMLRoot |
getRootNode(Reader reader,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the root Node from a Reader.
|
static XMLRoot |
getRootNode(Reader reader,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the root Node from a Reader.
|
static XMLRoot |
getRootNode(Reader reader,
int options)
Return the root Node from a Reader.
|
static XMLRoot |
getRootNode(Reader reader,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from a Reader.
|
static XMLRoot |
getRootNode(Reader reader,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the root Node from a Reader.
|
static XMLRoot |
getRootNode(Reader reader,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the root Node from a Reader.
|
static XMLRoot |
getRootNode(String str)
Return the root Node from a String.
|
static XMLRoot |
getRootNode(String str,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from a String.
|
static XMLRoot |
getRootNode(String str,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the root Node from a String.
|
static XMLRoot |
getRootNode(String str,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the root Node from a String.
|
static XMLRoot |
getRootNode(String str,
int options)
Return the root Node from a String.
|
static XMLRoot |
getRootNode(String str,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from a String.
|
static XMLRoot |
getRootNode(URL xmlURL)
Return the root Node from an XML URL.
|
static XMLRoot |
getRootNode(URL xmlURL,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from an XML URL.
|
static XMLRoot |
getRootNode(URL xmlURL,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the root Node from an XML URL.
|
static XMLRoot |
getRootNode(URL xmlURL,
boolean showExceptions,
boolean showWarnings,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware,
boolean allowInternalReaders)
Return the root Node from an XML URL.
|
static XMLRoot |
getRootNode(URL xmlURL,
int options)
Return the root Node from an URL.
|
static XMLRoot |
getRootNode(URL xmlURL,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers)
Return the root Node from an XML URL.
|
static XMLRoot |
getRootNode(URL xmlURL,
XMLParserConfiguration config,
boolean preserveSpace,
boolean keepLineNumbers,
boolean isNamespaceAware)
Return the root Node from an XML URL.
|
static void |
print(XMLNode node,
boolean isOrdered,
int indentation,
URL outputURL)
Save in an URL the content of an XML file under a root Node.
|
static String |
print(XMLNode node,
int indentation)
Print as a String the content of an XML file under a root Node.
|
static String |
print(XMLNode node,
int indentation,
boolean isOrdered)
Print as a String the content of an XML file under a root Node.
|
static void |
print(XMLNode node,
int indentation,
boolean isOrdered,
File outputFile)
Save in a File the content of an XML file under a root Node.
|
static void |
print(XMLNode node,
int indentation,
boolean isOrdered,
File outputFile,
NodeSerializer serializer,
String encoding)
Save in a File the content of an XML file under a root Node.
|
static void |
print(XMLNode node,
int indentation,
boolean isOrdered,
File outputFile,
String encoding)
Save in a File the content of an XML file under a root Node.
|
static String |
print(XMLNode node,
int indentation,
boolean isOrdered,
NodeSerializer serializer)
Print as a String the content of an XML file under a root Node.
|
static void |
print(XMLNode node,
int indentation,
boolean isOrdered,
NodeSerializer serialiser,
File outputFile)
Save in a File the content of an XML file under a root Node.
|
static String |
print(XMLNode node,
int indentation,
boolean isOrdered,
NodeSerializer serializer,
String encoding)
Print as a String the content of an XML file under a root Node.
|
static void |
print(XMLNode node,
int indentation,
boolean isOrdered,
NodeSerializer serializer,
URL outputURL)
Save in an URL the content of an XML file under a root Node.
|
static String |
print(XMLNode node,
int indentation,
boolean isOrdered,
String encoding)
Print as a String the content of an XML file under a root Node.
|
static void |
print(XMLNode node,
int indentation,
File outputFile)
Save in a File the content of an XML file under a root Node.
|
static void |
print(XMLNode node,
int indentation,
File outputFile,
String encoding)
Save in a File the content of an XML file under a root Node.
|
static String |
print(XMLNode node,
int indentation,
String encoding)
Print as a String the content of an XML file under a root Node.
|
static void |
print(XMLNode node,
int indentation,
URL outputURL)
Save in an URL the content of an XML file under a root Node.
|
static void |
resetConfiguration()
Reset the configuration of the underlying parser (reatures and properties).
|
static List<XMLNode> |
search(XMLNode node,
List<QName> qnames,
boolean deep)
Search for the children nodes having a specified qualified name.
|
static List<XMLNode> |
search(XMLNode node,
QName[] qnames,
boolean deep)
Search for the children nodes having a specified qualified name.
|
static List<XMLNode> |
search(XMLNode node,
QName qname,
boolean deep)
Search for the children nodes having a specified qualified name.
|
static List<XMLNode> |
search(XMLNode node,
String name,
boolean deep)
Search for the children nodes having a specified name.
|
static XMLNode |
searchFirst(XMLNode node,
List<QName> qnames,
boolean deep)
Search for the first child node having qualified name among a list of specified names.
|
static XMLNode |
searchFirst(XMLNode node,
QName[] qnames,
boolean deep)
Search for the first child node having qualified name among a list of specified names.
|
static XMLNode |
searchFirst(XMLNode node,
QName qname,
boolean deep)
Search for the first child node having a specified qualified name.
|
static XMLNode |
searchFirst(XMLNode node,
String name,
boolean deep)
Search for the the first child node having a specified name.
|
static XMLNode |
searchFirstForNames(XMLNode node,
List<String> names,
boolean deep)
Search for the the first child node having a specified name among a list of names.
|
static XMLNode |
searchFirstForNames(XMLNode node,
String[] names,
boolean deep)
Search for the the first child node having a specified name among a list of names.
|
static List<XMLNode> |
searchForNames(XMLNode node,
List<String> names,
boolean deep)
Search for the children nodes having a specified name among a list of names.
|
static List<XMLNode> |
searchForNames(XMLNode node,
String[] names,
boolean deep)
Search for the children nodes having a specified name among a list of names.
|
static void |
setCharset(Charset charset)
Set the charset to use to write the content.
|
static void |
setEntityListResolver(EntityListResolver resolver)
Set the EntityListResolver which can manage entity resolution in XML files.
|
static void |
setErrorHandler(ErrorHandler errorHandler)
Set an error handler wich will be fired for parsing errors detected by the underlying parser.
|
static void |
setFeature(String name,
boolean value)
Set a underlying parser factory feature.
|
static void |
setProperty(String name,
Object value)
Set an underlying parser property.
|
public static void setEntityListResolver(EntityListResolver resolver)
resolver - the resolverpublic static EntityListResolver getEntityListResolver()
public static void setCharset(Charset charset)
StandardCharsets.UTF_8.charset - the charsetpublic static Charset getCharset()
public static void setErrorHandler(ErrorHandler errorHandler)
errorHandler - the error handlerpublic static ErrorHandler getErrorHandler()
public static void resetConfiguration()
public static void setFeature(String name, boolean value)
name - the feature namevalue - the feature valuepublic static Map<String,Boolean> getFeatures()
public static void setProperty(String name, Object value)
name - the property namevalue - the property valuepublic static Map<String,Object> getProperties()
public static List<XMLNode> search(XMLNode node, String name, boolean deep)
<root desc="example">
<element1 name="first" id="theID">
<element2 name="second">
<element3 name="fourth" />
<element2 name="fith"/>
</element2>
<element3 name="third" />
</element1>
</root>
Then:
search(root, "element2", false), the method will return one node, which is the first "element2"
childsearch(root, "element2", true), the method will return two nodeq, which is the two "element2"
childrensearch(root, "h:element", false) is equivalent to
search(root, new QName(XMLConstants.NULL_NS_URI, "element", "h"), false)node - the root nodename - the name to search fordeep - if the search should continue for children of nodes found in the searchpublic static List<XMLNode> searchForNames(XMLNode node, List<String> names, boolean deep)
node - the root nodenames - the names to search fordeep - if the search should continue for children of nodes found in the searchpublic static List<XMLNode> searchForNames(XMLNode node, String[] names, boolean deep)
node - the root nodenames - the names to search fordeep - if the search should continue for children of nodes found in the searchpublic static XMLNode searchFirst(XMLNode node, QName qname, boolean deep)
node - the root nodeqname - the qualified name to search fordeep - if the search should continue for children of nodes found in the searchpublic static XMLNode searchFirst(XMLNode node, List<QName> qnames, boolean deep)
node - the root nodeqnames - the list of qualified names to search fordeep - if the search should continue for children of nodes found in the searchpublic static XMLNode searchFirst(XMLNode node, QName[] qnames, boolean deep)
node - the root nodeqnames - the list of qualified names to search fordeep - if the search should continue for children of nodes found in the searchpublic static XMLNode searchFirst(XMLNode node, String name, boolean deep)
<root desc="example">
<element1 name="first" id="theID">
<element2 name="second">
<element3 name="fourth" />
<element2 name="fith"/>
</element2>
<element3 name="third" />
</element1>
</root>
Then:
searchFirst(root, "element2", false), the method will return one node, which is the first "element2"
childsearchFirst(root, "element2", true), the method will also return one node, which is the first
"element2" childsearch(root, "h:element", false) is equivalent to
searchFirst(root, new QName(XMLConstants.NULL_NS_URI, "element", "h"), false)node - the root nodename - the name to search fordeep - if the search should continue for children of nodes found in the searchpublic static XMLNode searchFirstForNames(XMLNode node, List<String> names, boolean deep)
node - the root nodenames - the names to search fordeep - if the search should continue for children of nodes found in the searchpublic static XMLNode searchFirstForNames(XMLNode node, String[] names, boolean deep)
node - the root nodenames - the names to search fordeep - if the search should continue for children of nodes found in the searchpublic static List<XMLNode> search(XMLNode node, QName qname, boolean deep)
node - the root nodeqname - the qualified name to search fordeep - if the search should continue for children of nodes found in the searchpublic static List<XMLNode> search(XMLNode node, List<QName> qnames, boolean deep)
node - the root nodeqnames - the list of qualified names to search fordeep - if the search should continue for children of nodes found in the searchpublic static List<XMLNode> search(XMLNode node, QName[] qnames, boolean deep)
node - the root nodeqnames - the list of qualified names to search fordeep - if the search should continue for children of nodes found in the searchpublic static XMLRoot getRootNode(Reader reader)
reader - the Readerpublic static XMLRoot getRootNode(String str)
str - the Stringpublic static XMLRoot getRootNode(String str, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers)
str - the Stringconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLRoot getRootNode(String str, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
str - the StringshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLRoot getRootNode(String str, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
str - the StringshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLRoot getRootNode(String str, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers)
str - the StringshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLRoot getRootNode(File file)
file - the filepublic static XMLRoot getRootNode(File file, int options)
file - the fileoptions - the optionspublic static XMLRoot getRootNode(File file, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers)
file - the fileconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLRoot getRootNode(File file, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
file - the fileconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLRoot getRootNode(File file, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers)
file - the fileshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLRoot getRootNode(File file, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
file - the fileshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLRoot getRootNode(File file, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
file - the fileshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLRoot getRootNode(URL xmlURL)
xmlURL - the XML URLpublic static XMLRoot getRootNode(URL xmlURL, int options)
xmlURL - the URLoptions - the optionspublic static XMLRoot getRootNode(Reader reader, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers)
reader - the Readerconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLRoot getRootNode(Reader reader, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
reader - the Readerconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLRoot getRootNode(Reader reader, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
reader - the Readerconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLRoot getRootNode(Reader reader, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers)
reader - the ReadershowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLRoot getRootNode(Reader reader, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
reader - the ReadershowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLRoot getRootNode(Reader reader, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
reader - the ReadershowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLRoot getRootNode(Reader reader, int options)
reader - the Readeroptions - the optionspublic static XMLRoot getRootNode(String str, int options)
str - the Stringoptions - the optionspublic static XMLRoot getRootNode(URL xmlURL, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers)
xmlURL - the XML URLconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLRoot getRootNode(URL xmlURL, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
xmlURL - the XML URLconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLRoot getRootNode(URL xmlURL, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers)
xmlURL - the XML URLshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLRoot getRootNode(URL xmlURL, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
xmlURL - the XML URLshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLRoot getRootNode(URL xmlURL, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
xmlURL - the XML URLshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLNode getNode(String str)
str - the Stringpublic static XMLNode getNode(String str, int options)
str - the Stringoptions - the optionspublic static XMLNode getNode(String str, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers)
str - the Stringconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLNode getNode(String str, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers)
str - the StringshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLNode getNode(String str, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
str - the StringshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLNode getNode(String str, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
str - the StringshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLNode getNode(Reader reader, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers)
reader - the ReadershowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLNode getNode(Reader reader, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
reader - the ReadershowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLNode getNode(URL url)
url - the URLpublic static XMLNode getNode(URL xmlURL, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers)
xmlURL - the XML URLshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLNode getNode(URL xmlURL, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
xmlURL - the XML URLshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLNode getNode(URL xmlURL, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
xmlURL - the XML URLshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLNode getNode(URL xmlURL, int options)
xmlURL - the XML URLoptions - the optionspublic static XMLNode getNode(URL xmlURL, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers)
xmlURL - the XML URLconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLNode getNode(URL xmlURL, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
xmlURL - the XML URLconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLNode getNode(Reader reader, int options)
reader - the Readeroptions - the optionspublic static XMLNode getNode(Reader reader, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware)
reader - the Readerconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationpublic static XMLNode getNode(Reader reader, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
reader - the Readerconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static XMLNode getNode(Reader reader)
reader - the Readerpublic static XMLNode getNode(File file)
file - the filepublic static XMLNode getNode(File file, int options)
file - the fileoptions - the optionspublic static XMLNode getNode(File file, XMLParserConfiguration config, boolean preserveSpace, boolean keepLineNumbers)
file - the fileconfig - the parser configurationpreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLNode getNode(File file, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers)
file - the fileshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptpublic static XMLNode getNode(File file, boolean showExceptions, boolean showWarnings, boolean preserveSpace, boolean keepLineNumbers, boolean isNamespaceAware, boolean allowInternalReaders)
file - the fileshowExceptions - true if the parsing must show exceptionsshowWarnings - true if the parsing must show warningspreserveSpace - true if space characters must be preservedkeepLineNumbers - true if line numbers in the XML File are keptisNamespaceAware - true if the parser must keep the namespace informationallowInternalReaders - true if internal readers are allowedpublic static void print(XMLNode node, int indentation, File outputFile) throws IOException
node - the root nodeindentation - the indentation for the XML file for each child nodeoutputFile - the output fileIOExceptionpublic static void print(XMLNode node, int indentation, boolean isOrdered, File outputFile) throws IOException
node - the root nodeisOrdered - true if the attributes order is preservedindentation - the indentation for the XML file for each child nodeoutputFile - the output fileIOExceptionpublic static void print(XMLNode node, int indentation, boolean isOrdered, NodeSerializer serialiser, File outputFile) throws IOException
node - the root nodeindentation - the indentation for the XML file for each child nodeisOrdered - true if the attributes order is preservedserialiser - the node serializeroutputFile - the output fileIOExceptionpublic static void print(XMLNode node, int indentation, File outputFile, String encoding) throws IOException
node - the root nodeindentation - the indentation for the XML file for each child nodeoutputFile - the output fileencoding - the encoding (can be null)IOExceptionpublic static void print(XMLNode node, int indentation, boolean isOrdered, File outputFile, String encoding) throws IOException
node - the root nodeisOrdered - true if the attributes order is preservedindentation - the indentation for the XML file for each child nodeoutputFile - the output fileencoding - the encoding (can be null)IOExceptionpublic static void print(XMLNode node, int indentation, boolean isOrdered, File outputFile, NodeSerializer serializer, String encoding) throws IOException
node - the root nodeindentation - the indentation for the XML file for each child nodeoutputFile - the output fileisOrdered - true if the attributes order is preservedserializer - the node serializerencoding - the encoding (can be null)IOExceptionpublic static void print(XMLNode node, int indentation, URL outputURL) throws IOException
node - the root nodeindentation - the indentation for the XML file for each child nodeoutputURL - the output URLIOExceptionpublic static void print(XMLNode node, boolean isOrdered, int indentation, URL outputURL) throws IOException
node - the root nodeisOrdered - true if the attributes order is preservedindentation - the indentation for the XML file for each child nodeoutputURL - the output URLIOExceptionpublic static void print(XMLNode node, int indentation, boolean isOrdered, NodeSerializer serializer, URL outputURL) throws IOException
node - the root nodeindentation - the indentation for the XML file for each child nodeisOrdered - true if the attributes order is preservedserializer - the node serializeroutputURL - the output URLIOExceptionpublic static String print(XMLNode node, int indentation)
node - the root nodeindentation - the indentation for the XML file for each child nodepublic static String print(XMLNode node, int indentation, boolean isOrdered)
node - the root nodeisOrdered - true if the attributes order is preservedindentation - the indentation for the XML file for each child nodepublic static String print(XMLNode node, int indentation, boolean isOrdered, NodeSerializer serializer)
node - the root nodeindentation - the indentation for the XML file for each child nodeisOrdered - true if the order of attributes is preservedserializer - the node serializerpublic static String print(XMLNode node, int indentation, String encoding)
node - the root nodeindentation - the indentation for the XML file for each child nodeencoding - the encoding (vcan be null)public static String print(XMLNode node, int indentation, boolean isOrdered, String encoding)
node - the root nodeisOrdered - true if the order of attributes is preservedindentation - the indentation for the XML file for each child nodeencoding - the encoding (vcan be null)public static String print(XMLNode node, int indentation, boolean isOrdered, NodeSerializer serializer, String encoding)
node - the root nodeindentation - the indentation for the XML file for each child nodeisOrdered - true if the order of attributes is preservedserializer - the serializerencoding - the encoding (vcan be null)