HP mini110 PHP minixml detailed

Source: Internet
Author: User
Using the following method, you can see the use of minixml, compared with activelink-php-xml-package-0.4.0, more in line with the use of habits, but also more simple.
$xmlDoc = new Minixmldoc ();
$xmlRoot =& $xmlDoc->getroot ();
$childElement =& $xmlRoot->createchild (\ ' achild\ ');
$childElement->attribute (\ ' name\ ', \ ' annie\ ');
$childElement->text (\ ' This element has attributes and children, such as This\ ');
$image =& $childElement->createchild (\ ' image\ ');
$image->attribute (\ ' location\ ', \ ' http://psychogenic.com/image.png\ ');
$childElement->text (\ ' image and Little\ ');
$orphan =& $xmlDoc->createelement (\ ' song\ ');
$orphan->text (\ ' Tomorrow, tomorrow\ ');
$childElement->appendchild ($orphan);
Print $xmlDoc->tostring ();
Add a child element, there are two ways, the first is directly the node Createchild, the second is first XmlDoc first createelement, then, the node in AppendChild.
The final print results are:


This element have attributes and children, such as this

Image and Little
tomorrow, Tomorrow

It can be clearly seen that the use of minixml is very simple, especially for the simple preservation of the data of the XML file, more so, the details can be seen in the example provided by Minixml. It is unknown here.
=========================================================================
Analytical
The Minixml file structure is:
minixml.inc.php
------Classes
-----------doc.inc.php element.inc.php node.inc.php treecomp.inc.php
Detailed explanation of the API, on the official website is introduced: http://minixml.psychogenic.com/api.html.

The above describes the HP mini110 PHP minixml details, including the HP mini110 aspects of the content, I hope to be interested in PHP tutorial friends helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.