I'm writing a small program that gets user input about books, processes the information as book
objects. Then, it exports the data to an XML file
Currently, I'm getting this output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<booklist>
<book>
<title>Hunger Games</title>
<price>9.99</price>
<description>Description paragraph one
Description paragraph two
Description paragraph</description>
</book>
<book>
<title>Catching Fire</title>
<price>9.99</price>
<description>Description paragraph one
Description paragraph two
Description paragraph three</description>
</book>
</booklist>
If you look closely, you will see tha the description doesnt look right. When I load the file, my code reads the data perfectly, and has no problem build the objects. However, I would like my description tag to have an extra new line after the openning tag and before the clossing tag, without modifying the objects description. How do I do that?