Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
So let's say you have a UUID in an .xml file in your program and you're writing a java program in a, well, java file. They're both in the same folder so they are in the "same house just different rooms" if you understand what I mean.

What steps do you have to take to refer to that specified UUID in that .xml file in your java program?

What I have tried:

I've googled and searched for a solution but I wasn't able to find anything satisfactory to my problem.
Posted
Updated 5-Oct-21 3:41am

1 solution

You have to open the XML file, read the content, find the node(s) you are interested in, and assign them fo java variables. We really can't be any more specific, because XML is a hierarchical structured file format (i.e. the data inside resembles a tree, which branches, twigs, and leaves). It stores collections of classes, rather than just a specific data item.

Start here: How to Read XML File in Java - Javatpoint[^] and here: A Guide to XML in Java[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900