SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simplexml_load_string

    hi guys ,

    I'm trying to read from XML file , but I'm getting the following warning

    HTML Code:
    Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '<' not found in C:\www\crm-3\kml\readKMLPatch.php on line 23
    Call Stack

    my script is

    PHP Code:
    if (!function_exists('simplexml_load_file')) exit('<br>function does not exist');
    if (
    file_exists('ss.kml'))
    {
        
    $xml =  simplexml_load_string('ss.kml');
        
    var_dump($xml);
    }
    else { exit(
    '<br>Error could not locate XML file'); } 
    you help will be appreciated

  2. #2
    SitePoint Evangelist AlienDev's Avatar
    Join Date
    Feb 2007
    Location
    UK
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    'ss.kml'
    should be
    file_get_contents('ss.kml')
    Me on StackOverflow | Blog & personal website.

    I mostly use: PHP, Java, JavaScript, Android.

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes , i have fixed it ..thanks


Bookmarks

Posting Permissions

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