Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?
  2. php
  3. //
  4. load the stylesheet file.
  5. $
  6. xslDoc
  7. = new
  8. DOMDocument
  9. ();
  10. $
  11. xslDoc
  12. -
  13. >
  14. load
  15. ("sommaire.xsl");
  16. // load the
  17. xml file
  18. to transform
  19. $
  20. xmlDoc
  21. = new
  22. DOMDocument
  23. ();
  24. $
  25. xmlDoc
  26. -
  27. >
  28. load
  29. ("chapitre.xml
  30. ");
  31. //
  32. create the XSLT processor
  33. $
  34. proc = new
  35. XSLTProcessor
  36. ();
  37. $
  38. proc
  39. -
  40. >
  41. importStylesheet
  42. ($
  43. xslDoc
  44. );
  45. //
  46. transform and display result
  47. echo
  48. $proc
  49. -
  50. >
  51. transformToXML
  52. ($
  53. xmlDoc
  54. );
  55. ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement