Package cloud.opencode.base.xml
package cloud.opencode.base.xml
OpenCode Base XML Module - Comprehensive XML processing library
OpenCode Base XML 模块 - 全面的 XML 处理库
This module provides a complete set of XML processing utilities including:
此模块提供完整的 XML 处理工具集,包括:
- DOM parsing and manipulation - DOM 解析和操作
- SAX event-driven parsing - SAX 事件驱动解析
- StAX pull-mode parsing - StAX 拉模式解析
- XPath query support - XPath 查询支持
- XML-to-Bean binding (JAXB-style) - XML 到 Bean 绑定(JAXB 风格)
- XSLT transformation - XSLT 转换
- Schema/DTD validation - Schema/DTD 验证
- XXE attack protection - XXE 攻击防护
- Namespace handling - 命名空间处理
Quick Start | 快速开始:
// Parse XML
XmlDocument doc = OpenXml.parse(xml);
// Build XML
String xml = OpenXml.builder("root")
.element("name", "value")
.toXml(4);
// XPath query
String value = OpenXml.xpath(doc, "//name/text()");
// Validate
boolean valid = OpenXml.isWellFormed(xml);
- Since:
- JDK 25, opencode-base-xml V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
ClassDescriptionOpenXml - Unified facade for XML operations OpenXml - XML 操作的统一门面XML Document - Wrapper for DOM Document with fluent API XML 文档 - 提供流式 API 的 DOM Document 封装XML Element - Wrapper for DOM Element with fluent API XML 元素 - 提供流式 API 的 DOM Element 封装XML Node Interface - Base interface for XML nodes XML 节点接口 - XML 节点的基础接口Node type enumeration.