On Thu, May 23, 2013 at 4:54 PM, Richard Quadling <rquadling@xxxxxxxxx>wrote: > Hi. > > I'm building an XML file. > > It is within an OOP structure and is pretty simple. > > The method is ... > <snip> > > Nothing particularly difficult to understand, but I just don't like having > the XML embedded this way. > > Ideally, I want a scope aware include function, so I can say _something_ > like ... > > $s_XML = require_once __CLASS__ . DIRECTORY_SEPARATOR . > 'normalisedError.xml'; > > and have the include be aware of the local scope (so $o_XML and $this are > all happy). > > I know I can write a template parser, but I'm just missing an obvious > solution that isn't fat and doesn't require a massive learning for the > other devs. > > Ideas? > > Thanks for reading. > > Richard. > > What is wrong with the require_once? I don't see why it would not work. - Matijn