Module cloud.opencode.base.xml


module cloud.opencode.base.xml
OpenCode Base XML Module OpenCode 基础 XML 模块

Provides lightweight XML processing capabilities based on JDK built-in APIs, including DOM/SAX/StAX parsing, XPath queries, Bean binding, and XSLT transformation.

提供基于 JDK 内置 API 的轻量级 XML 处理能力,包括 DOM/SAX/StAX 解析、XPath 查询、Bean 绑定和 XSLT 转换。

Key Features | 主要功能:

  • OpenXml - Unified facade for all XML operations - 统一门面
  • DOM/SAX/StAX - Multiple parsing modes - 多解析模式
  • XPath - Powerful query support - XPath 查询
  • XmlBinder - Bean binding with annotations (JAXB style) - Bean 绑定
  • XmlBuilder - Fluent API for building XML - 流式构建
  • XsltTransformer - XSLT transformation - XSLT 转换
  • SchemaValidator - XSD/DTD validation - Schema 验证
  • XmlSecurity - XXE protection (default enabled) - XXE 防护
  • Namespace support - 命名空间支持

Parser Selection Guide | 解析模式选择:

  • DOM - Small files (<10MB), random access, XPath - 小文件、随机访问
  • SAX - Large files, read-only, sequential - 大文件、只读、顺序处理
  • StAX - Large files, streaming, best performance - 大文件、流式、最佳性能
Since:
JDK 25, opencode-base-xml V1.0.0
Author:
Leon Soo