Properties XML Reader

Round trip java properties files to an extended XML format, including comments, retaining 100% fidelity.

Лицензия

Лицензия

Группа

Группа

com.brentcroft.tools
Идентификатор

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

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

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

01.01.05
Дата

Дата

Тип

Тип

jar
Описание

Описание

Properties XML Reader
Round trip java properties files to an extended XML format, including comments, retaining 100% fidelity.
Ссылка на сайт

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

http://github.com/brentcroft/properties-reader
Система контроля версий

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

http://github.com/brentcroft/properties-reader

Скачать pxr

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.brentcroft.tools : materializer jar 00.01.05

provided (2)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar RELEASE
net.java.dev.javacc : javacc jar 7.0.10

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar RELEASE
com.tngtech.jgiven : jgiven-junit jar 0.18.2

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

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

properties-reader

Maven Central

JavaCC grammar and kit to generate SAX events describing a java properties file, and an XSL transform to regenerate the original file.

Java 1.5+

Following, and extending, on the decomposition of Java properties text specified by Apache PropertiesConfiguration, this kit attempts to provide 100% round trip fidelity between Java properties text and a simple XML form (extending the Java properties XML specification) via a simple object model (PxrProperties).

The XML form is further extended to support insert, update and delete actions on all parts of a properties text.

Summary operations are provided in:

JavaCC grammar

A JavaCC grammar generates the PxrParser which parses PxrProperties objects from properties text:

PxrReader

A PxrReader emits SAX events from a PxrProperties object.

For example, given the following properties text:

#sample header

color=red

#the size is large
size=large

#sample footer

when the properties text is parsed the SAX events will be:

<properties>
    <comment key="_header">
        <![CDATA[#sample header]]>
    </comment>
    <comment key="color"/>
    <entry key="color" index="1">red</entry>
    <comment key="size" lines-before="1">
        <![CDATA[#the size is large]]>
    </comment>
    <entry key="size" index="2">large</entry>
    <comment key="_footer" lines-before="1" eol="0">
        <![CDATA[#sample footer]]>
    </comment>
</properties>

PxrWriter

A PxrWriter handles SAX events to create or update a PxrProperties object.

For example, given the properties text:

color=red
size=large

when the following SAX events are handled:

<update>
    <entry key='color'>
        <text>blue, </text>
        <text prefix='    ' >red</text>
    </entry>
</update>

Then the properties text will be:

color=blue, \
    red
size=large

XSL Transform

An XSL transform re-constitutes properties text from SAX events:

com.brentcroft.tools

Brentcroft

Good at grasping things, and then twisting them.

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

Версия
01.01.05
01.01.04
01.01.03
01.01.02
01.01.01