Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remove all Non-Tagged XML Question

    Hi I have a doc that outputs in this format:

    Fri Feb 26 13:16:39 PST 2010:- <?xml version="1.0" encoding="UTF-8"?>

    What might be the best way to strip everything to the left of <?xml version="1.0" encoding="UTF-8"?> in order to output everything as a clean XML doc?

    Thanks so much

  • #2
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    5
    Thanked 14 Times in 14 Posts
    Hi, try
    PHP Code:
    echo preg_replace('#^(.*?)(\<\?xml\b)#misux','$2',$Input_String); 
    URL2SEO URL shortener and redirection services

  • #3
    Regular Coder
    Join Date
    Jul 2007
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks so much!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •