#Best library to read a XML file and get value from an element?
1 messages · Page 1 of 1 (latest)
<@&987246452180930620> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
Options seem to be between JDOM and Jackson, which one would be the best here?
jackson works well. but u will feel that its a json lib with xml support added on top
and not a dedicated xml lib
JOOX
its "jquery for xml"
which means if you aren't trying to bind the entire document it should be more than sufficient
var doc = $("""
<elements>
<element id="abc"> Apple </element>
<element> Orange </element>
</elements>
""");
System.out.println(
doc.find("#abc").text()
);
Apple
basic example
JOOX seems incredibly simple. I'll give it a try.
Right now I'm working with JDOM though, I'm wondering if this still is a good tool? I haven't worked with XML before so I don't want to put off my employer by using something weird, so I'm curious if JDOM is still a "valid" or widely used library
No clue
i have not used JDOM
generally things that just parse data never really become obsolete
personally i like JOOX because its a module
and you can use jlink, etc
but i know most dont care about that
I think probably all of the options are valid
Using JOOX, thank you, its perfect for me.