REXML - preserve comments?

Does REXML preserve comments in the source XML? How does one access
them?

Thanks!

I haven't checked, but my guess is that yes, REXML preserves comments
in the document, and that's because comments are just another type of
XML node, like elements and text nodes are. You should be able to
access them with generic node accessor functions, and determine that
they're comments based on their node type.