Answer the question
In order to leave comments, you need to log in
XML file not opening?
Everything is very simple, and I do not understand why!
Document dom = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file);
<?xml version="1.0" encoding="UTF-8" ?>
<jtablemodel>
<column name="Альтернативы" >
<item>Петя</item>
<item>Вася</item>
<item> ... </item>
<item>Игорь</item>
</column>
</jtablemodel>
Answer the question
In order to leave comments, you need to log in
Obviously, you made a mistake with the file parameter. Check that this file exists (file.exists()). Print its content before passing it to parse.
One of the best tools for XML is codebeautify.org/xmlviewer XML formatter, XML validator, XML minify, XML to JSON, XML to CSV
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question