title: How to read an XML file with an undefined namespace with XMLReader?
body: <p>I'm relatively new to parsing XML files and am attempting to read a large XML file with XMLReader.  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ShowVehicleRemarketing environment="Production" lang="en-CA" release="8.1-Lite" xsi:schemaLocation="http://www.starstandards.org/STAR /STAR/Rev4.2.4/BODs/Standalone/ShowVehicleRemarketing.xsd"&gt;
    &lt;ApplicationArea&gt;
      &lt;Sender&gt;
        &lt;Component&gt;Component&lt;/Component&gt;
        &lt;Task&gt;Task&lt;/Task&gt;
        &lt;ReferenceId&gt;w5/cron&lt;/ReferenceId&gt;
        &lt;CreatorNameCode&gt;CreatorNameCode&lt;/CreatorNameCode&gt;
        &lt;SenderNameCode&gt;SenderNameCode&lt;/SenderNameCode&gt;
        &lt;SenderURI&gt;http://www.example.com&lt;/SenderURI&gt;
        &lt;Language&gt;en-CA&lt;/Language&gt;
        &lt;ServiceId&gt;ServiceId&lt;/ServiceId&gt;
      &lt;/Sender&gt;
      &lt;CreationDateTime&gt;CreationDateTime&lt;/CreationDateTime&gt;
      &lt;Destination&gt;
        &lt;DestinationNameCode&gt;example&lt;/DestinationNameCode&gt;
      &lt;/Destination&gt;
    &lt;/ApplicationArea&gt;
  ...
  </code></pre>
  
  <p>I am recieving the following error</p>
  
  <blockquote>
    <p>ErrorException [ Warning ]: XMLReader::read() [xmlreader.read]: compress.zlib://D:/WebDev/example/local/public/../upload/example.xml.gz:2: namespace error : Namespace prefix xsi for schemaLocation on ShowVehicleRemarketing is not defined</p>
  </blockquote>
  
  <p>I've searched around and can't find much useful information on using XMLReader to read XML files with namespaces -- How would I go about defining a namespace, if that is in fact what I need to do.. little help? links to pertinent resources?</p>