5 Replies Latest reply on Oct 26, 2006 12:28 PM by MikerRoo

    XML Includes and XMLPArse()

    little_seal Level 1
      I have an XML file that has the following at the top:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE MyDtd[
      <!ENTITY getInclude SYSTEM "thisInclude.xml">
      ]>

      Later on in the file I call the include:
      <product>
      <name>productName</name>
      <version>ProductVersion</version>
      &getInclude;
      </product>

      Both the parent and the include XML files are properly formated and when I open the parent or even just the include in a browser they render correctly. However, when I use Coldfusion's XML Parse():

      <cfscript>
      Request.myXML = XmlParse(expandPath('/config/config.xml'));
      </script>
      <cfdump var="#Request.myXML#">

      the results are incorrect. What I get back is this "[unknown type]". However, if I remove the &getInclude; the page renders fine. So far I must conclude that XMLParse() cannot handle XML Includes. This isn't anything new. Includes inXML has been around for awhile. I can't be the first to encounter this am I? Is there something I'm missing or not aware of that's preventing this from working?