save XML without XML Prolog

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    save XML without XML Prolog

    Hi,

    I'm trying to save a xhtml snippet to file. Is there a way besides fwrite() to save an xml string without the xml prolog (e.g. DOMDocument::sa ve() automatically inserts the xml prolog)?

    note: the string to save doesn't contain the prolog.

    thanks
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    The file_put_conten ts function perhaps?

    Or am I not getting the problem?

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya, Dormi.

      Try using DOMDocument::sa veXML() instead, and run a substr() on it if necessary.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        file_put_conten ts() looks good. I'll try that.

        @pbmods: I already have the string, I only need saving.

        thanks Atli

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          tried file_put_conten ts(). it works really well (much less coding than fwrite()).

          thanks for the quick help, anyway.

          Comment

          Working...