Write data to properties file in XML format | How to store key-value pairs in XML using Java Code

Pubblicato il: 07 ottobre 2020
sul canale di: Suresh SDET Automation
2,343
25

Hi Friends,

How to write the data to a properties file in XML format Java | Selenium

1. The properties object contains key and value pair both as a string. The java.util.The properties class is the subclass of Hashtable.

2. It can be used to get property value based on the property key. The Properties class provides methods to get data from the properties file and store data into the properties file.

3. If any information is changed from the properties file, you don't need to recompile the java class. It is used to store information that is to be changed frequently.

Methods:

Properties(): It creates an empty property list with no default values.

storeToXML() : Emits an XML document representing all of the properties contained in this table.

Fileoutputstream(): A file output stream is an output stream for writing data to a File

Cypress Automation:    • Cypress Automation  

Rest Assured + TestNG :    • API Automation - Rest Assured  

Automation batch jobs :    • Automation Batch - CMD  

Cucumber Framework:    • Cucumber/BDD Framework  

SDLC/STLC :    • SDLC/STLC  

GitHub Series:    • GitHub Tutorial Series  

TestNG Framework :    • TestNG Framework Tutorial Series  

QA/SDET Java interview question :    • Automation Testing Interview Questions  

Selenium interview questions and answers for freshers and experienced:    • Selenium interview questions  

Filesystem in java and selenium:    • FileSystem_JAVA/Selenium  

Selenium beginners tutorials:    • Selenium Beginner Tutorial  

Postman beginners tutorials:    • Postman beginner tutorial  

Selenium :    • Selenium  

Advance selenium:    • Advance Automation  

Mobile testing:    • Mobile Testing  

Please do subscribe for more tutorials on selenium automation @SH Study Tech

Please share questions and queries in the comments section.

Follow me on Facebook: https://fb.me/SHStudyTech

Follow me on LinkedIn :   / sh-study-tech-b24979202  

Follow me on the blog: https://shstudytech.blogspot.com/

Follow me on Twitter: shstudy


Subscribe to youtube channel:    / @sureshsdetautomation  


In questa pagina del sito puoi guardare il video online Write data to properties file in XML format | How to store key-value pairs in XML using Java Code della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Suresh SDET Automation 07 ottobre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,343 volte e gli è piaciuto 25 spettatori. Buona visione!