// note: namespace-aware parsing is by default true
SourceInfo sourceInfo = new SourceInfo();
try
{
XMLEvent event;
while ((event = parser.nextEvent()) != null)
{
if (event.type == XMLEvent.DOCTYPE_DECL)
{
DoctypeDeclEvent doctypeDeclEvent = (DoctypeDeclEvent)event;