About the xml structure of text package

Source: Internet
Author: User
About text containing xml structure $ html = 'http/1.20.okcache-Control: private, max-age = 0Content-Type: text/xml; charset = utf-8Server: microsoft-IIS/7.0X-about text containing xml structure
$ Html = 'http/1.1 200 OK Cache-Control: private, max-age = 0 Content-Type: text/xml; charset = utf-8 Server: microsoft-IIS/7.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP. NET Date: Mon, 22 Oct 2012 07:38:15 GMT Connection: close Content-Length: 315 0 11022153815002472 Submitted 0 ';

As shown above .. how to separate the strings and xml in $ html ?~~~

The php language is used.

Please forgive me ~~~

------ Solution --------------------
PHP code
Preg_match ('/<\? Xml version (. *) <\/CSubmitState>/is ', $ html, $ match); print_r ($ match [0]);
------ Solution --------------------
Echo strstr ($ html ,'
You have crawled the information. if you have removed the header, you don't have to differentiate it.

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.