Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PHP XmlReader problem

  • 30-03-2007 3:32pm
    #1
    Closed Accounts Posts: 23


    I've been toying around with a simple php script that uses the xmlreader function to print out various things from an xml file, by placing different things inside the printf statements in the while loop, like so:
    <?php
    $xml = new XMLReader();
    $xml->open("filename.xml");
    while($xml->read())
    {
    printf($xml->name."\n");
    printf($xml->depth."\n");
    printf($xml->value."\n");

    }
    ?>

    However, when i use the xml->name function, to print the name of the nodes, it prints the name of the node, followed by either usually #text or #comment.
    The actual xml looks like this
    <product_type>Album</product_type>
    <total_duration>01:10:28</total_duration>
    <total_components>1</total_components>

    While a sample output(with the other 2 printf statements commented out) for my code would look like this:
    product_type #text product_type #text
    total_duration #text total_duration #text
    total_components #text total_components #text

    Does anybody know how to fix this?


Advertisement