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.3
- Author:
- Leon Soo
-
Packages
ExportsPackageDescriptionOpenCode Base XML Module - Comprehensive XML processing library OpenCode Base XML 模块 - 全面的 XML 处理库Bind Package - XML to Java object binding (JAXB-style) 绑定包 - XML 到 Java 对象绑定(JAXB 风格)Bind Adapters - Type adapters for XML binding 绑定适配器 - XML 绑定的类型适配器Bind Annotations - XML binding annotations 绑定注解 - XML 绑定注解Builder Package - Fluent XML builders 构建器包 - 流式 XML 构建器Canonical Package - XML canonicalization (C14N) 规范化包 - XML 规范化 (C14N)Diff Package - XML document comparison and differencing 比较包 - XML 文档比较和差异计算DOM Package - Document Object Model parsing and manipulation DOM 包 - 文档对象模型解析和操作XML Exception Classes - Exception hierarchy for XML operations XML 异常类 - XML 操作的异常层次结构Merge Package - XML document merging and overlay 合并包 - XML 文档合并和覆盖Namespace Package - XML namespace handling 命名空间包 - XML 命名空间处理Path Package - Simple dot-notation path access for XML elements 路径包 - XML 元素的简单点表示法路径访问SAX Package - Simple API for XML (Event-driven parsing) SAX 包 - XML 简单 API(事件驱动解析)XML Security - Security configuration for XML parsers XML 安全 - XML 解析器的安全配置Splitter Package - Stream-based XML splitting by element name 拆分包 - 按元素名称进行基于流的 XML 拆分StAX Package - Streaming API for XML (Pull-mode parsing) StAX 包 - XML 流式 API(拉模式解析)Transform Package - XSLT transformation and formatting 转换包 - XSLT 转换和格式化Validate Package - XML validation (Schema/DTD) 验证包 - XML 验证(Schema/DTD)XPath Package - XPath query support XPath 包 - XPath 查询支持