How to create an XML DOCTYPE in php5?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MrKrinkle

    How to create an XML DOCTYPE in php5?

    How do I make an xml file with this in it, using the xml api's in php
    5.04?

    <!DOCTYPE abcdef [
    <!ENTITY nbsp " ">
    <!ENTITY lt "&#60;">
    <!ENTITY gt ">">
    <!ENTITY amp "&#38;">
    <!ENTITY apos "'">
    <!ENTITY copy "©">
    ]>

  • Janwillem Borleffs

    #2
    Re: How to create an XML DOCTYPE in php5?

    MrKrinkle wrote:[color=blue]
    > How do I make an xml file with this in it, using the xml api's in php
    > 5.04?
    >[/color]

    See:


    You will notice that inline dtd declarations are not supported, as the pages
    describes:

    "Entity declarations and notations are not made available. Entity reference
    expansions and default attribute additions do not occur."
    [color=blue]
    > <!ENTITY gt ">">[/color]

    This is an invalid declaration (> is a reserved character in XML)


    JW



    Comment

    • John Dunlop

      #3
      OT - XML entity declarations

      Janwillem Borleffs wrote:
      [color=blue]
      > MrKrinkle wrote:
      >[color=green]
      > > <!ENTITY gt ">">[/color]
      >
      > This is an invalid declaration[/color]

      Cite?

      --
      Jock

      Comment

      • MrKrinkle

        #4
        Re: How to create an XML DOCTYPE in php5?


        Janwillem Borleffs wrote:[color=blue][color=green]
        > > <!ENTITY gt ">">[/color]
        >
        > This is an invalid declaration (> is a reserved character in XML)
        >
        >
        > JW[/color]

        Yes, please cite this.

        Meanwhile I'll put in a feature request for php to support the full xml
        1.0 specification, which is like 10 years old. Or to provide a
        workaround.

        thanks

        Comment

        Working...