• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

write to xml - file created but nothing in it

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm trying to learn to write to .xml, I have some buttons that I want to add and save dynamically. This is my code, which is meant only to write the specified below xml format in the file and nothing else, I'll build the rest later. The file is created, it says UTF-8 encoding etc. up top, but there's nothing else in it, and for the love of me, I can't find what's missing. Many pairs of eyes are better than one; can you please help out? Thanks..


 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Two things to get a better response from people. One, UseCodeTags (← that's a link) around your code. Second, post working code if possible. For instance, the imports for this code will make a lot of difference.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't ever add anything to the buttonsToXML document. Not even a root element. So when you go to write it, it's empty.
 
maria constantinescu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Knute for the advice, thank you Paul for the tip. It works perfectly fine
 
reply
    Bookmark Topic Watch Topic
  • New Topic