public class XMLUtility extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
do_module_lock |
Constructor and Description |
---|
XMLUtility() |
Modifier and Type | Method and Description |
---|---|
static String |
xml_getAttribute(Node node,
String name)
Nodeの指定した属性の値を返す.
|
static List<Node> |
xml_getAttributes(Node node)
Nodeの属性のリストを返す.
|
static List<Element> |
xml_getChildren(Node node)
Nodeの子エレメントを返す.
|
static Element |
xml_getElementNode(Element parent,
String name)
Nodeの指定した名前の子エレメントを返す.
|
static String |
xml_getNodeText(Node node)
Nodeのテキストを返す(再帰しない).
|
static void |
xml_module_lock() |
static void |
xml_module_unlock() |
static boolean |
xml_write_sax(Document document,
Writer wr,
boolean standalone,
boolean doIndent)
XMLをSAX を利用してWriterに出力する.
|
static boolean |
xml_write(Document document,
Writer wr,
boolean standalone,
boolean doIndent)
XMLをWriterに出力する.
|
static DocumentBuilder |
xmlCreateBuilder(boolean nsAware,
boolean ignoreWS,
boolean validating,
EntityResolver enRes)
Create Document Builder.
|
static Transformer |
xmlCreateTransformer()
Transformerを作成する.
|
static XMLUtility.XMLElement |
xmlParse(DocumentBuilder parser,
Reader reader)
Parse XML and return root element.
|
public static void xml_module_lock()
public static void xml_module_unlock()
public static final DocumentBuilder xmlCreateBuilder(boolean nsAware, boolean ignoreWS, boolean validating, EntityResolver enRes)
nsAware
- namespace awarenessignoreWS
- ignore whitespacevalidating
- enable validatingenRes
- entity resolverpublic static final XMLUtility.XMLElement xmlParse(DocumentBuilder parser, Reader reader)
parser
- document builderreader
- xml readerpublic static final List<Node> xml_getAttributes(Node node)
node
- Nodepublic static final String xml_getAttribute(Node node, String name)
node
- Nodename
- 属性名public static final List<Element> xml_getChildren(Node node)
node
- Nodepublic static final Element xml_getElementNode(Element parent, String name)
parent
- Nodename
- 名前public static final String xml_getNodeText(Node node)
node
- Nodepublic static Transformer xmlCreateTransformer() throws TransformerException
TransformerException
- Transformerの作成に失敗した場合.public static boolean xml_write(Document document, Writer wr, boolean standalone, boolean doIndent)
document
- Document.wr
- Writerstandalone
- output standalone attributedoIndent
- output indenticationEDB Working Group at Fri Apr 18 13:43:17 JST 2025