I have the following code to read an xml document:
Code:
            Dim ReportDoc As New Xml.XmlDocument
            Dim Settings As New System.Xml.XmlReaderSettings

            Settings.ProhibitDtd = False
            Settings.ValidationType = Xml.ValidationType.None

            Using XmlReader As Xml.XmlReader = Xml.XmlTextReader.Create(AppFramework.AppFolders.PrimaryConfigurationReportsFolder & "facility_detail_report.xml", Settings)
                ReportDoc.Load(XmlReader)
            End Using
The code is reading the following xml:
Code:
<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE report_data
 [
  <!ENTITY hd_attributes  SYSTEM "../hazard_division_attributes.xml" >
  <!ENTITY type_code_attributes     SYSTEM "../type_code_attributes.xml" >
  <!ENTITY facility_data       SYSTEM "facility_export.xml"  >
]
>

<report_data>

  &hd_attributes;
  &type_code_attributes;
  &facility_data;

</report_data>
The VB code errors on the line with ReportDoc.Load(XmlReader). The error it gives is "Invalid text declaration. Line 1, position 21." I'm thinking this may be a red herring, since the line looks like something that is standard to xml files.

Since I'm kinda new to this whole xml/xsl transformation stuff, I'm not sure if the error is in the vb code or in the xml document. I've been copying and pasting stuff from different examples I've found, so that may be part of the issue as well.

Any help would be appreciated.