Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Features in development:

## Building

You need Java 17 and [Apache Ant 1.10.12](https://ant.apache.org) or newer
You need Java 21 and [Apache Ant 1.10.14](https://ant.apache.org) or newer

- Point your JAVA_HOME variable to JDK 17
- Point your JAVA_HOME variable to JDK 21
- Checkout this repository
- Run `ant` to compile the source code

Expand Down
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="compile" name="XMLJava">
<property name="target" value="17" />
<property name="source" value="17" />
<property name="target" value="21" />
<property name="source" value="21" />
<property name="build.compiler" value="javac10+" />
<target name="init">
<mkdir dir="bin" />
Expand Down
Binary file modified lib/xmljava.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions src/com/maxprograms/xml/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

public class Constants {

public static final String VERSION = "1.4.0";
public static final String BUILD = "20231113_1047";
public static final String VERSION = "1.5.0";
public static final String BUILD = "20231229_1000";
}
19 changes: 19 additions & 0 deletions src/com/maxprograms/xml/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,25 @@ public void setText(String text) {
content.add(new TextNode(text));
}

public String getHead() {
StringBuilder result = new StringBuilder("<" + name);
List<String> keys = new Vector<>();
keys.addAll(attsTable.keySet());
Collections.sort(keys);
Iterator<String> it = keys.iterator();
while (it.hasNext()) {
Attribute a = attsTable.get(it.next());
result.append(' ');
result.append(a.toString());
}
result.append(">");
return result.toString();
}

public String getTail() {
return "</" + name + ">";
}

@Override
public String toString() {
StringBuilder result = new StringBuilder("<" + name);
Expand Down
2 changes: 0 additions & 2 deletions src/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

exports com.maxprograms.xml;

opens com.maxprograms.xml to mapdb;

requires java.base;
requires transitive java.xml;
}