Problems with XMLTextWriter

  • Thread starter Thread starter CyberCo
  • Start date Start date
Nak said:
Hi,

Here's your code back, you were declaring a new XML writer when calling
the openinvoices method, this was then falling out of scope and closing.
If you look at the openinvoices method now it checks to see if it's been
created, if not creates it and enables writing until close has been
called.

Mind you it's rather a strange way of persisting XML. I would
recommend storing the invoice objects in a typed collection or even an
arraylist, then persisting them all at once. Anyway, just an idea.

Nick.

Yes, I know it's strange but I'm new to all that xml stuff. This code is
from the book I'm reading right now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top