Check Valid XML file - Php

Check Valid XML File

Snippet Code


  
Rate this page :
  [ 0 votes]

This code is about Checking Valid xml file or not

<?php libxml_use_internal_errors(true); $sitemap ="http://test.com/sitemap.xml"; if (!$myxml=simplexml_load_file($sitemap)) { echo "Invalid XML File"; } else echo "Valid XML File"; ?>

Tags


Ask Questions

Ask Question