forum

Home / DeveloperSection / Forums / Writing xml string with StAX

Writing xml string with StAX

Anonymous User 1594 11-Dec-2015
Is it possible to write an xml chunk directly using StAX? I know I can use an XMLStreamWriter with writeStartElement, writeCharacters and writeEndElement but there is no flexibility for xml strings.

How do I get around this limitation considering I have to write a large xml file (> 100 MB).

I have arbitrary xml strings like this, sometimes with a fairly complex structure, that need to be added together with some other details to form the final xml file. This is just an example not the actual xml string.

<food>
<name>Strawberry Belgian Waffles</name>
<price>$7.95</price>
<description>
Light Belgian waffles covered with strawberries and whipped cream
</description>
<calories>900</calories>
</food>

Updated on 11-Dec-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By