Hi All,
I have been using the SAX library in PHP to parse XHTML documents, and one
thing I have noted is that the <!DOCTYPE> line is ignored.
I am wondering is there any way to get the <!DOCTYPE> using the SAX
functions in PHP? I am looking over the manual, but nothing is jumping out
at me...
reference: http://us4.php.net/manual/en/ref.xml.php
I have thought about loading it using DOM, but I'd rather not consume the
memory if possible. And another option would be to just using simple string
parsing methods to pull it out of the original document, but again I am
hoping that I would be able to do it somehow using the SAX functions... any
chance of this?
Sincerely,
-Josh
I have been using the SAX library in PHP to parse XHTML documents, and one
thing I have noted is that the <!DOCTYPE> line is ignored.
I am wondering is there any way to get the <!DOCTYPE> using the SAX
functions in PHP? I am looking over the manual, but nothing is jumping out
at me...
reference: http://us4.php.net/manual/en/ref.xml.php
I have thought about loading it using DOM, but I'd rather not consume the
memory if possible. And another option would be to just using simple string
parsing methods to pull it out of the original document, but again I am
hoping that I would be able to do it somehow using the SAX functions... any
chance of this?
Sincerely,
-Josh
Comment