stevedlawrence commented on issue #343:
URL: 
https://github.com/apache/daffodil-vscode/issues/343#issuecomment-1307576082

   I'm not too familiar with VS Code extension, but it looks like this is the 
function of interest:
   
   
https://github.com/apache/daffodil-vscode/blob/main/server/core/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala#L777-L789
   
   In that function, you use the `XMLTextInfosetOutputter` to write the infoset 
to a String as XML.
   
   Here are the different infoset inputters and outputters Daffodil has 
built-in:
   
   
https://daffodil.apache.org/docs/latest/javadoc/org/apache/daffodil/japi/infoset/package-frame.html
   
   Note that SAX uses a different API, so you would need to use the 
`DataProcessor.newXMLReaderInstance()` to get a SAX `XMLReader`, and then you 
can use normal SAX APIs/ContentHandlers/etc.
   
   That said, most of those don't output to text so if you use them they would 
require extra processing, and probably wouldn't have much benefit to mos users, 
unless you need to do some preprocessing before user display. I would say only 
the `XMLTextInfosetOutputer` and maybe `JsonInfosetOutputter` would be of use 
to most users.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to