[xml] How to retrieve filename from xmlTextWriter

Hi all,
I am exporting data from binary format to XML.
Most of the data fits nicely into the XML document, it looks nice, tidy and easy to read.

However, there are a few large blocks of data. For example, 4k floats is not very useful as a BASE64 encoded string, and having 4k elements is not very useful, neither.
So, I thought I'd export these blocks 'as-is', into binary format, as a separate file, right next to the XML file and store the location on the binary file into the XML instead.

To achieve this, I'd need to find out the URI of the XML file being written (so I can change the file extension from XML to BIN and write the file to the same place where the XML is).
Unfortunately, the xmlTextWriter does not have any members that would give me the URI.

Is there any legitimate way to figure it out - one that I must have missed?

The thing is, I would not want to update all classes involved just to pass down the URI of the XML document; it would be far better go get the filename on the spot, using the xmlTextWriterPtr that's already passed down.

Thank you!

Best regards: Zoltán Ördögh

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]