For phpdom, do not use DOMDocument-> load to directly read the xml written in the current php

Source: Internet
Author: User
Can php dom be directly read and written in the current php xml without using DOMDocument-& gt; load & nbsp; can dom be used without using DOMDocument-& gt; load & nbsp; reads files from other locations, and directly reads the xml written in the current php file as a string, & nbsp; in addition, whether the php dom can be directly read from the xml file written in the current php without using DOMDocument-> load
Can php dom be used to read files from other locations without using DOMDocument-> load, but directly read the xml written in string in the current php file, is there any way to print the xml content in DOMDocument directly on the webpage without saving it to another file. No way found. please tell me. Thank you.
------ Solution --------------------
Manual:
Class DOMDocument {
Bool loadXML (string source [, int options])
}
That is, DOMDocument-> loadXML ('....')

DOMDocument-> save no matter whether the file name to be saved is used as a parameter, the corresponding XML string is returned.
Echo DOMDocument-> save ()

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.