// pull-parse the document until we reach the document element and put the collected information
// into the sourceInfo object
try
{
XMLEvent event;
while ((event = parser.nextEvent()) != null)
{
if (event.type == XMLEvent.DOCTYPE_DECL)
{
DoctypeDeclEvent doctypeDeclEvent = (DoctypeDeclEvent)event;
sourceInfo.setPublicId(doctypeDeclEvent.pubid);