diff --git a/README.md b/README.md index 94a6bf6..cb075ec 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build.xml b/build.xml index 55458e4..47ed090 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - - + + diff --git a/lib/xmljava.jar b/lib/xmljava.jar index 621c6fe..1acb61f 100644 Binary files a/lib/xmljava.jar and b/lib/xmljava.jar differ diff --git a/src/com/maxprograms/xml/Constants.java b/src/com/maxprograms/xml/Constants.java index e0f6162..7785847 100644 --- a/src/com/maxprograms/xml/Constants.java +++ b/src/com/maxprograms/xml/Constants.java @@ -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"; } diff --git a/src/com/maxprograms/xml/Element.java b/src/com/maxprograms/xml/Element.java index 9923834..6c88da6 100644 --- a/src/com/maxprograms/xml/Element.java +++ b/src/com/maxprograms/xml/Element.java @@ -334,6 +334,25 @@ public void setText(String text) { content.add(new TextNode(text)); } + public String getHead() { + StringBuilder result = new StringBuilder("<" + name); + List keys = new Vector<>(); + keys.addAll(attsTable.keySet()); + Collections.sort(keys); + Iterator 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 ""; + } + @Override public String toString() { StringBuilder result = new StringBuilder("<" + name); diff --git a/src/module-info.java b/src/module-info.java index ffc2a06..b010d8c 100644 --- a/src/module-info.java +++ b/src/module-info.java @@ -11,8 +11,6 @@ exports com.maxprograms.xml; - opens com.maxprograms.xml to mapdb; - requires java.base; requires transitive java.xml; }