com.liferay.portal.xml
Class SAXReaderImpl
java.lang.Object
com.liferay.portal.xml.SAXReaderImpl
- All Implemented Interfaces:
- SAXReader
public class SAXReaderImpl
- extends Object
- implements SAXReader
Method Summary |
Attribute |
createAttribute(Element element,
QName qName,
String value)
|
Attribute |
createAttribute(Element element,
String name,
String value)
|
Document |
createDocument()
|
Document |
createDocument(Element rootElement)
|
Document |
createDocument(String encoding)
|
Element |
createElement(QName qName)
|
Element |
createElement(String name)
|
Entity |
createEntity(String name,
String text)
|
Namespace |
createNamespace(String uri)
|
Namespace |
createNamespace(String prefix,
String uri)
|
ProcessingInstruction |
createProcessingInstruction(String target,
Map<String,String> data)
|
ProcessingInstruction |
createProcessingInstruction(String target,
String data)
|
QName |
createQName(String localName)
|
QName |
createQName(String localName,
Namespace namespace)
|
Text |
createText(String text)
|
XPath |
createXPath(String xpathExpression)
|
static SAXReaderImpl |
getInstance()
|
protected org.dom4j.io.SAXReader |
getSAXReader(boolean validate)
|
Document |
read(File file)
|
Document |
read(File file,
boolean validate)
|
Document |
read(InputStream is)
|
Document |
read(InputStream is,
boolean validate)
|
Document |
read(Reader reader)
|
Document |
read(Reader reader,
boolean validate)
|
Document |
read(String xml)
|
Document |
read(String xml,
boolean validate)
|
Document |
read(URL url)
|
Document |
read(URL url,
boolean validate)
|
Document |
readURL(String url)
|
Document |
readURL(String url,
boolean validate)
|
List<Node> |
selectNodes(String xpathFilterExpression,
List<Node> nodes)
|
List<Node> |
selectNodes(String xpathFilterExpression,
Node node)
|
void |
sort(List<Node> nodes,
String xpathExpression)
|
void |
sort(List<Node> nodes,
String xpathExpression,
boolean distinct)
|
static List<Attribute> |
toNewAttributes(List<org.dom4j.Attribute> oldAttributes)
|
static List<Element> |
toNewElements(List<org.dom4j.Element> oldElements)
|
static List<Namespace> |
toNewNamespaces(List<org.dom4j.Namespace> oldNamespaces)
|
static List<Node> |
toNewNodes(List<org.dom4j.Node> oldNodes)
|
static List<ProcessingInstruction> |
toNewProcessingInstructions(List<org.dom4j.ProcessingInstruction> oldProcessingInstructions)
|
static List<org.dom4j.Attribute> |
toOldAttributes(List<Attribute> newAttributes)
|
static List<org.dom4j.Node> |
toOldNodes(List<Node> newNodes)
|
static List<org.dom4j.ProcessingInstruction> |
toOldProcessingInstructions(List<ProcessingInstruction> newProcessingInstructions)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAXReaderImpl
public SAXReaderImpl()
getInstance
public static SAXReaderImpl getInstance()
toNewAttributes
public static List<Attribute> toNewAttributes(List<org.dom4j.Attribute> oldAttributes)
toNewElements
public static List<Element> toNewElements(List<org.dom4j.Element> oldElements)
toNewNamespaces
public static List<Namespace> toNewNamespaces(List<org.dom4j.Namespace> oldNamespaces)
toNewNodes
public static List<Node> toNewNodes(List<org.dom4j.Node> oldNodes)
toNewProcessingInstructions
public static List<ProcessingInstruction> toNewProcessingInstructions(List<org.dom4j.ProcessingInstruction> oldProcessingInstructions)
toOldAttributes
public static List<org.dom4j.Attribute> toOldAttributes(List<Attribute> newAttributes)
toOldNodes
public static List<org.dom4j.Node> toOldNodes(List<Node> newNodes)
toOldProcessingInstructions
public static List<org.dom4j.ProcessingInstruction> toOldProcessingInstructions(List<ProcessingInstruction> newProcessingInstructions)
createAttribute
public Attribute createAttribute(Element element,
QName qName,
String value)
- Specified by:
createAttribute
in interface SAXReader
createAttribute
public Attribute createAttribute(Element element,
String name,
String value)
- Specified by:
createAttribute
in interface SAXReader
createDocument
public Document createDocument()
- Specified by:
createDocument
in interface SAXReader
createDocument
public Document createDocument(Element rootElement)
- Specified by:
createDocument
in interface SAXReader
createDocument
public Document createDocument(String encoding)
- Specified by:
createDocument
in interface SAXReader
createElement
public Element createElement(QName qName)
- Specified by:
createElement
in interface SAXReader
createElement
public Element createElement(String name)
- Specified by:
createElement
in interface SAXReader
createEntity
public Entity createEntity(String name,
String text)
- Specified by:
createEntity
in interface SAXReader
createNamespace
public Namespace createNamespace(String uri)
- Specified by:
createNamespace
in interface SAXReader
createNamespace
public Namespace createNamespace(String prefix,
String uri)
- Specified by:
createNamespace
in interface SAXReader
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target,
Map<String,String> data)
- Specified by:
createProcessingInstruction
in interface SAXReader
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target,
String data)
- Specified by:
createProcessingInstruction
in interface SAXReader
createQName
public QName createQName(String localName)
- Specified by:
createQName
in interface SAXReader
createQName
public QName createQName(String localName,
Namespace namespace)
- Specified by:
createQName
in interface SAXReader
createText
public Text createText(String text)
- Specified by:
createText
in interface SAXReader
createXPath
public XPath createXPath(String xpathExpression)
- Specified by:
createXPath
in interface SAXReader
selectNodes
public List<Node> selectNodes(String xpathFilterExpression,
List<Node> nodes)
- Specified by:
selectNodes
in interface SAXReader
selectNodes
public List<Node> selectNodes(String xpathFilterExpression,
Node node)
- Specified by:
selectNodes
in interface SAXReader
sort
public void sort(List<Node> nodes,
String xpathExpression)
- Specified by:
sort
in interface SAXReader
sort
public void sort(List<Node> nodes,
String xpathExpression,
boolean distinct)
- Specified by:
sort
in interface SAXReader
read
public Document read(File file)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(File file,
boolean validate)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(InputStream is)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(InputStream is,
boolean validate)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(Reader reader)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(Reader reader,
boolean validate)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(String xml)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(String xml,
boolean validate)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(URL url)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
read
public Document read(URL url,
boolean validate)
throws DocumentException
- Specified by:
read
in interface SAXReader
- Throws:
DocumentException
readURL
public Document readURL(String url)
throws DocumentException,
MalformedURLException
- Specified by:
readURL
in interface SAXReader
- Throws:
DocumentException
MalformedURLException
readURL
public Document readURL(String url,
boolean validate)
throws DocumentException,
MalformedURLException
- Specified by:
readURL
in interface SAXReader
- Throws:
DocumentException
MalformedURLException
getSAXReader
protected org.dom4j.io.SAXReader getSAXReader(boolean validate)