Skip navigation links
EDB/Java
jp.ac.tokushima_u.db.common

Class XMLUtility



  • public class XMLUtility
    extends Object
    • Field Detail

      • do_module_lock

        public static boolean do_module_lock
    • Constructor Detail

      • XMLUtility

        public XMLUtility()
    • Method Detail

      • xml_module_lock

        public static void xml_module_lock()
      • xml_module_unlock

        public static void xml_module_unlock()
      • xmlCreateBuilder

        public static final DocumentBuilder xmlCreateBuilder(boolean nsAware,
                                                             boolean ignoreWS,
                                                             boolean validating,
                                                             EntityResolver enRes)
        Create Document Builder.
        Parameters:
        nsAware - namespace awareness
        ignoreWS - ignore whitespace
        validating - enable validating
        enRes - entity resolver
        Returns:
        document builder
      • xmlParse

        public static final XMLUtility.XMLElement xmlParse(DocumentBuilder parser,
                                                           Reader reader)
        Parse XML and return root element.
        Parameters:
        parser - document builder
        reader - xml reader
        Returns:
        root element (null if parse was failed).
      • xml_getAttributes

        public static final List<Node> xml_getAttributes(Node node)
        Nodeの属性のリストを返す.
        Parameters:
        node - Node
        Returns:
        属性のリスト
      • xml_getAttribute

        public static final String xml_getAttribute(Node node,
                                                    String name)
        Nodeの指定した属性の値を返す.
        Parameters:
        node - Node
        name - 属性名
        Returns:
        属性の値
      • xml_getChildren

        public static final List<Element> xml_getChildren(Node node)
        Nodeの子エレメントを返す.
        Parameters:
        node - Node
        Returns:
        子エレメントのリスト
      • xml_getElementNode

        public static final Element xml_getElementNode(Element parent,
                                                       String name)
        Nodeの指定した名前の子エレメントを返す.
        Parameters:
        parent - Node
        name - 名前
        Returns:
        子エレメント
      • xml_getNodeText

        public static final String xml_getNodeText(Node node)
        Nodeのテキストを返す(再帰しない).
        Parameters:
        node - Node
        Returns:
        テキスト
      • xml_write

        public static boolean xml_write(Document document,
                                        Writer wr,
                                        boolean standalone,
                                        boolean doIndent)
        XMLをWriterに出力する.
        Parameters:
        document - Document.
        wr - Writer
        standalone - output standalone attribute
        doIndent - output indentication
        Returns:
        success.
      • xml_write_sax

        public static boolean xml_write_sax(Document document,
                                            Writer wr,
                                            boolean standalone,
                                            boolean doIndent)
        XMLをSAX を利用してWriterに出力する.
        Parameters:
        document - Document.
        wr - Writer
        standalone - output standalone attribute
        doIndent - output indentication
        Returns:
        success.
EDB/Java

EDB Working Group at Fri Apr 18 13:43:17 JST 2025