FluentXML4J

A fluent API for XML parsing, serialization and XPath querying in Java.

Лицензия

Лицензия

Группа

Группа

com.github.fluentxml4j
Идентификатор

Идентификатор

fluentxml4j
Последняя версия

Последняя версия

1.0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

FluentXML4J
A fluent API for XML parsing, serialization and XPath querying in Java.
Ссылка на сайт

Ссылка на сайт

https://github.com/fluentxml4j
Система контроля версий

Система контроля версий

https://github.com/fluentxml4j/fluentxml4j.git

Скачать fluentxml4j

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.fluentxml4j/fluentxml4j/ -->
<dependency>
    <groupId>com.github.fluentxml4j</groupId>
    <artifactId>fluentxml4j</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.fluentxml4j/fluentxml4j/
implementation 'com.github.fluentxml4j:fluentxml4j:1.0.3'
// https://jarcasting.com/artifacts/com.github.fluentxml4j/fluentxml4j/
implementation ("com.github.fluentxml4j:fluentxml4j:1.0.3")
'com.github.fluentxml4j:fluentxml4j:jar:1.0.3'
<dependency org="com.github.fluentxml4j" name="fluentxml4j" rev="1.0.3">
  <artifact name="fluentxml4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.fluentxml4j', module='fluentxml4j', version='1.0.3')
)
libraryDependencies += "com.github.fluentxml4j" % "fluentxml4j" % "1.0.3"
[com.github.fluentxml4j/fluentxml4j "1.0.3"]

Зависимости

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19

Модули Проекта

Данный проект не имеет модулей.

FluentXML4J - a fluent API for XML in Java

Build Status Code Coverage Maven Central License

XML parsing, serialization XPath querying and transformation without boilerplate code

Features

  • Simple, fluent API but full flexibility
  • Parse from java.io inputs to org.w3c.dom.Document
  • Serialize org.w3c.dom.Document to any java.io output
  • Transform from java.io, SAX, StAX, JAXB input to any of them with XSLT and custom filters support
  • Query org.w3c.dom.Document via XPath for String, Boolean, Number, org.w3c.dom.Element or Node, get the results as collections or process with the Java 8 Streaming API
  • Validate document against schemas
  • No (required) dependencies

Requirements

FluentXML4J uses the builtin JDK XML parser and XPath API, but Java 8 is required because of streaming API and Optional support.

Maven Dependency

<dependency>
  <groupId>com.github.fluentxml4j</groupId>
  <artifactId>fluentxml4j-core</artifactId>
  <version>2.2.1</version>
</dependency>

Examples

Parsing

Document doc = parse(getClass().getResourceAsStream("example.xml"))
    .document();

More parsing examples...

Serialization

serialize(document).to(System.err);

More serialization examples...

Transformation

Document resultDoc = transform(inputDoc)
        .withStylesheet(xsltInputStream)
        .toDocument();

More transformation examples...

XPath Querying

List<Element> elements = from(doc)
    .selectElements("//*")
    .asList();

More xpath examples...

Similar and related Projects

  • xmltool - another fluent API for XML
  • dom4j - alternative DOM implementation
  • jdom - alternative DOM implementation
  • XMLDog - a XML stream sniffer

Contributing

FluentXML4J is an open source project, and contributions are welcome! Feel free to raise an issue or submit a pull request.

License

Copyright (c) 2017 by Cornelius Buschka.

Apache License, Version 2.0

com.github.fluentxml4j

fluentxml4j

Версии библиотеки

Версия
1.0.3
1.0.2
1.0.1
1.0.0