Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Reading content in XML on server

  1. #11
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    - Can you tell me if XML files can as extension HTML or allways XML? I'm new.
    Any file can have any extension. Extensions are only a convention to make the contents of the file more easily guessable at a glance, and don't have any bearing on the actual content of the file.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #12
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by xerxes
    -The XML file can have any extension.
    -The loop is something like:
    PHP Code:
    for ($i 0$i $items->length$i++) 
    {
    echo 
    $items->item($i)->nodeValue "\n";

    What will do actually this code?


    Quote Originally Posted by xerxes
    Use the directory functions to look for the appropriate filename structure in a specified directory.
    Can you tell specific function to use directory function? Need help...

  3. #13
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What will do actually this code?
    Absolutely nothing, as the variable "items" isn't defined. It's an example of code that loops through all the elements inside a given element (or is that an array of elements? I don't know much about the PHP implementation of XMLDOM) and echoes the values of all tags inside it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #14
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the start,

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
  •