Jump to content
Sign in to follow this  
simenss

"Rydde opp" i XML-fil med PHP

Recommended Posts

Finnes det noen god måte å "rydde opp" i XML-filer med PHP? Fjerne kommentarer, sette alt rett under hverandre, fjerne unødvendige linjeskift, mellomrom osv?

 

F.eks. gjøre om:

            <?xml version="1.0"?>

 

<File_version    version="2.0">

<!--***********  XML file - By kommentar*******-->

 

 

 

 

 

      <image    Source="bilde.gif"/>

 

 

 

<image Source="bilde22.gif"/>

 

    <!--***********  XML file - By kommentar*******-->

<!--IMAGES**************************************************************-->

  <image Source="bilde56.gif"/>

 

...til:

 

<?xml version="1.0"?>

<File_version version="2.0">

<image Source="bilde.gif"/>

<image Source="bilde22.gif"/>

<image Source="bilde56.gif"/>

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...