title: Why does XPath expression fail on Illustrator-generated XML?
body: <p>Below I have two XML (SVG) documents. The original has been opened in Adobe Illustrator and just exported. That is all.</p>
  
  <p>The difference is that I cannot make any XPath expression work with the exported file! </p>
  
  <p><code>xmllint --xpath '/svg' org.svg</code> gives me the entire contents of the <code>&lt;svg&gt;</code> element, including child nodes, whereas <code>xmllint --xpath '/svg' ill.svg</code> just outputs <code>XPath set is empty</code>. </p>
  
  <p>I cannot find any meaningful difference between the two files, except the <code>DOCTYPE</code>, but adding it manually makes no difference.</p>
  
  <p><strong>org.svg</strong></p>
  
  <pre><code>&lt;?xml version="1.0" standalone="no"?&gt;
  &lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
  &lt;svg viewBox = "0 0 800 600" version = "1.1"&gt;
  &lt;!-- Oslo --&gt;
  
      &lt;path
          id = "Oslo_0"
          fill = "green"
          stroke = "white" stroke-width = "1"
          d = "M294.816,483.766l0.71,1.432l3.134,4.696c0.528,0.793,0.701,1.776,0.47,2.701l-0.193,0.793 c0.659,0.131,1.29,0.391,1.77,0.874l0.435,0.417l1.049,0.502l3.259,1.569c1.294,0.518,1.551,1.756,1.551,3.146v1.786l1.96,3.442 c0.299,0.741,0.522,1.541,0.268,2.297l-0.269,1.359l0.485,0.119l0.408,0.702L311.49,511h0.6h2.598h0.947l-1.272-6.497 c-0.105-0.525-0.179-1.427-0.03-1.943l1.435-5.858l-0.806-0.671L314,495.032v-0.824c0-0.892,1.77-1.751,2.4-2.383l1.436-0.351 l-0.061-1.118l-0.781-0.433l-0.322-0.211l-4.858-3.25c-0.575-0.384-1.002-0.918-1.256-1.563l-2.469-4.064 c-0.158-0.396-1.089-0.826-1.089-1.252v-2.102l0.287-2.98l-1.477-2.634c-0.224-0.301-0.133-0.605-0.25-0.963l-1.164-2.435 c-0.118-0.357-0.396-0.695-0.396-1.073v-0.346l-2.684-1.15c-0.335-0.168-0.577,0.64-0.844,0.376L300.125,467h-3.611l0.986,2.668 c0.297,1.207-0.083,2.15-1,2.989l-6.98,6.237l4.508,3.928C294.35,483.103,294.624,483.383,294.816,483.766z"
      /&gt;
  
  &lt;/svg&gt;
  </code></pre>
  
  <p><strong>ill.svg</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --&gt;
  &lt;svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
       width="612px" height="792px" viewBox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve"&gt;
  &lt;path id="Oslo_0" fill="#008000" stroke="#FFFFFF" d="M225.5,536.6l0.5,1.1l2.4,3.6c0.4,0.6,0.5,1.4,0.4,2.1l-0.1,0.6
      c0.5,0.1,1,0.3,1.4,0.7l0.3,0.3l0.8,0.4l2.5,1.2c1,0.4,1.2,1.3,1.2,2.4v1.4l1.5,2.6c0.2,0.6,0.4,1.2,0.2,1.8l-0.2,1l0.4,0.1l0.3,0.5
      l1.3,1.1h0.5h2h0.7l-1-5c-0.1-0.4-0.1-1.1,0-1.5l1.1-4.5l-0.6-0.5l-0.7-0.8v-0.6c0-0.7,1.4-1.3,1.8-1.8l1.1-0.3l0-0.9l-0.6-0.3
      l-0.2-0.2l-3.7-2.5c-0.4-0.3-0.8-0.7-1-1.2l-1.9-3.1c-0.1-0.3-0.8-0.6-0.8-1v-1.6l0.2-2.3l-1.1-2c-0.2-0.2-0.1-0.5-0.2-0.7l-0.9-1.9
      c-0.1-0.3-0.3-0.5-0.3-0.8v-0.3l-2.1-0.9c-0.3-0.1-0.4,0.5-0.6,0.3l-0.3,0.6h-2.8l0.8,2c0.2,0.9-0.1,1.6-0.8,2.3l-5.3,4.8l3.4,3
      C225.2,536.1,225.4,536.3,225.5,536.6z"/&gt;
  &lt;/svg&gt;
  </code></pre>