: Potentially -- my problem is, why is XMLWriter a sacred cow? There's not
I'm not trying to suggest that it should be ... my point wasn't to suggest that we shouldn't modify XMLWriter because it needs to be preserved as is -- my point was that given XMLWriter's origins, trying to shoehorn general purpose functionality into it is prbably going to be an uphill battle, and it might be easier and more beneficial in the long term to approach the problem from a "what kind of utilities/helper code would make it easier for people to write custom Response Writers that generate structures of their own choosing in XML?" : even a SOLR namespace or DTD to go along with it? Why should users be able : to inject their own custom XML into it -- it would seem that FieldTypes have : the ability to do this anyways (e.g., I can declare any new type of field : and its XML output [without namespaces sure, but still])... i'm not understanding what you mean ... i'm not fond of the way we have FieldType.write(XMLWriter xmlWriter, String name, Fieldable f) and FieldType.write(TextResponseWriter writer, String name, Fieldable f) ... but those methods don't allow custom fieldtypes to inject arbitrary XML, they're still confined to the existing XMLWriter and TextResponseWriter APIs -- those hooks just give the FieldType the ability to call the approraite write method (writeStr, writeInt, etc...) based on the inherient type of the data. -Hoss