Java XML工具包 nala

码农软件 · 软件分类 · XML相关工具 · 2019-09-17 16:42:19

软件介绍

Nala 是一个基于Java的XML对象绑定工具,支持将Java对象序列化为XML或者将XML绑定在Java对象上

  • 支持Map/注释信息的Java对象/命名约束的Java对象与XML之间的绑定

  • 支持Cdata对象的绑定和Xml作为文本进行绑定

  • 支持Xpath指定路径进行绑定

安装方法:

<dependency>
    <groupId>org.pinae</groupId>
    <artifactId>nala</artifactId>
    <version>1.6</version>
</dependency>

示例代码:

public class DemoTestManager {
    public static void main(String arg[]) throws Exception {
        try {
            StringBuffer xml = new ResourceReader().readFile("test.xml");
            //Parse XML to Object
            Map map = Xml.toMap(xml.toString(), "utf8");
            //convert Object to XML 
            String xml = Xml.toXML(map, "utf8", true);
        } catch (IOException e) {

        }
    }
}

本文地址:https://www.codercto.com/soft/d/14807.html

Sass and Compass in Action

Sass and Compass in Action

Wynn Netherland、Nathan Weizenbaum、Chris Eppstein、Brandon Mathis / Manning Publications / 2013-8-2 / USD 44.99

Written by Sass and Compass creators * Complete Sass language reference * Covers prominent Compass community plug-ins * Innovative approach to creating stylesheets Cascading Style Sheets paint the we......一起来看看 《Sass and Compass in Action》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具
html转js在线工具

html转js在线工具