help in read/write using woodstox stax parser

View: New views
1 Messages — Rating Filter:   Alert me  

help in read/write using woodstox stax parser

by gandalf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i'm a newbie to woodstox and stax. i'm facing some issues in parsing and marshaling xml files using woodstox and needed some help on the same.

I'm using the API's through the XMLStreamReader and XMLStreamWriter interfaces.

1) How do i write the "standalone" attribute of the xml declaration to a file? Is it possible via the above interfaces and if not what can i do ?

2) I've set an xml reporter using the setter of the XMLInputFactory but on occurring of exceptions the report() method of the reporter is not getting invoked. Is there something else that needs to be done or does this method have to be invoked explicitly?

3) How do i write out a doctype declaration to a file (not the dtd, just the declaration)? When i try writeCharacters(), it gives an error saying "non-whitespace characters not allowed in prolog".

hope someone can help. thanks.