-1

I've been working on a project where I need to get some information of a XML document, and insert on another XML document, but they are different files, and the new file must not exceed 400KB, and I'm trying to return the Read() method go back to the last element he readed, and to remove the element of XmlWriter(). Any ideas?

  • 1
    How large is the input file? If it fits in memory, then try reading the whole thing in with `XDocument`, then writing out chunks at a time until you get near 400KB. – John Saunders Jun 09 '14 at 15:44

1 Answers1

0

You can't do that. XmlReader is a forward-only reader of nodes, and XmlWriter is a forward-only writer.

John Saunders
  • 160,644
  • 26
  • 247
  • 397