[PHP] Re: How to build a XML DTD on the fly?

2005-11-18 Thread Erik Franzén
I saw this example on http://blog.bitflux.ch/wiki/GetElementById_Pitfalls and thought that I could create the DTD in the XML file. $xml ='?xml version=1.0? !DOCTYPE foo [ !ATTLIST bar id ID #IMPLIED ] foo bar id=myId/ /foo'; $dom = new DomDocument(); $dom-loadXML($xml);

[PHP] Re: How to build a XML DTD on the fly?

2005-11-18 Thread Erik Franzén
My real problem is that I am building a XML tree and I want to use the getElementbyId method on the tree directly. It would be very nice if it is possible to do it without including a external dtd, since it takes some time to load every time. The page

[PHP] Re: How to build a XML DTD on the fly?

2005-11-17 Thread James Benson
Learn DTD and how it works first then you will know :-) A DTD is contained in an external file and not in XML, so you would create a DTD file then link it from the XML like so, !DOCTYPE document SYSTEM document.dtd Erik Franzén wrote: The code below lacks the part where the folling DTD