xml - xpath php sort attribute based on greater than date -
Exception xml data needs to be based on the date attribute more than the symbol above the dash function at the below given date Prevents more and more. Is there a way to remove dash in XML on the fly?
XML
& lt; Research & gt; & Lt; Revised date = "2010-07-12" & gt; Blown & lt; / Revision & gt; & Lt; Revised date = "2010-06-12" & gt; Blown & lt; / Revision & gt; & Lt; / Revision & gt;
PHP
$ rdate = 2010-07-01; $ Program = $ item- & gt; Xpath ("/ Programs / Programs [Amendments / Modifications [Date & Date; ''. $ Rdate. '' ']]");
You can try:
$ Rdate = 20100701; / Programs / Programs [Amendments / Modifications] [Translation (@days, '-', '') & gt; Edit: Anyone should keep in mind that XPath 2.0 has the comparison ()
function available (-1 small, 0 equals, 1 High), so that you can compare the stars. As far as I know that most PHP implementations are still using XPath 1.0.
Comments
Post a Comment