Organizational Research By

Surprising Reserch Topic

php what is the best approach to using xml need to create and parse xml respons


php what is the best approach to using xml need to create and parse xml respons  using -'php,xml'

What are the recommended libraries for XML in PHP? Advantages? Looking to create/send/parse XML. Needs to support High Volume (Millions of calls per day)
    

asked Oct 11, 2015 by yashwantpinge
0 votes
4 views



Related Hot Questions

2 Answers

0 votes

PHP supports a number of XML libraries.

If memory is an issue, for instance due to large files, use an Event-based parser over a tree-based one.Tree-based parsers must fully load the file into memory in order to parse the XML. Event-based parsers do not need to load the entire file into memory to begin parsing.

See this article about what's new with XML in PHP5 and a discussion of their pros and cons.

You might also reconsider where you store the data, since filesystem might be too slow for millions of calls. How about Xindice?

answered Oct 11, 2015 by amit_cmps
0 votes

If you want use PHP intern XML Parser there are

XPATH DOM SimpleXml

Or If you want to use a XML Parser for PHP i can recommend Simplepie

there are a lot but Simplepie is one of the Best.

Here is a Simple overview of how you could use it.

set_feed_url('http://simplepie.org/blog/feed/');
$feed->init();
$feed->handle_content_type();
?>

get_title(); ?>

get_description(); ?>

get_items(0, 5) as $item): ?>

get_title(); ?>

get_description(); ?>

Posted on get_date('j F Y | g:i a'); ?>

answered Oct 11, 2015 by loknath.ganji

...