
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
com.github.codemonstur:simplexml
Advanced tools
A clean and simple XML parser, serializer, and deserializer.
After a number of bad experiences with XML parsing in Java I decided to write my own parser.
This project has the following characteristics; correct XML parsing, small, few dependencies, thread-safe, user friendly API, secure.
Version 3.x depends on Java 19. For Java 8 support you have to use 2.x versions.
The unit tests in src/test/java/unittests can give you a good idea of the capabilities of SimpleXml. There are also a number of small example programs in src/test/java/example that showcase various features.
It's in maven central.
<dependency>
<groupId>com.github.codemonstur</groupId>
<artifactId>simplexml</artifactId>
<version>3.2.0</version>
</dependency>
The simplest case possible:
import xmlparser.XmlParser;
public class MyObject {
String name;
}
MyObject object = new MyObject();
object.name = "test";
final XmlParser parser = new XmlParser();
System.out.println(parser.toXml(object));
This code will output:
<myobject>
<name>test</name>
</myobject>
There are more serialization options
For more documentation on serializing look in src/docs/serialize.md.
The simplest case possible:
import xmlparser.XmlParser;
public class MyObject {
String name;
}
final XmlParser parser = new XmlParser();
final MyObject object = parser.fromXml("<myobject><name>test</name></myobject>", MyObject.class);
System.out.println(object.name);
This code will output:
test
The deserializer will respect the same annotations as the serializer
If there is a feature you would like to have, but doesn't exist, please let me know.
The MIT license. And I left out the copyright notice everywhere because I just don't care.
FAQs
A clean and simple XML parser, serializer, and deserializer.
We found that com.github.codemonstur:simplexml demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.