What Is SimpleXML?

2 minutes
Share the link to this page
Copied
  Completed
SimpleXML is an extension that allows us to easily manipulate and get XML data. SimpleXML provides an easy way of getting an element's name, attributes and textual content if you know the XML document's structure or layout. SimpleXML turns an XML document into a data structure you can iterate through like a collection of arrays and objects.

Transcript

Hello in this video we are going to talk about what is simple XML. So simple XML is basically an extension that provides us the methods and utilities to easily handle manipulate and get XML data. So simple XML provides a really easy way to get like an elements namely attributes and other content as well if you you know, know the actual XML structure or lab because we've got a low example here note, we've got some some sub nodes to from heading and body. But the root nodes have to be noted the sub nodes don't have to be like this. There could be multiple tiers of sub nodes, global nodes, you know, the, the actual former, then you're good to go with simple XML. And so simple XML turns a document data XML into a data structure that you can basically iterate through likely, you know, collection of arrays and objects.

So it basically makes into a more easy to access format. And you might be thinking, how do we use it and install it to install it since PHP, five, XML functions are actually part of the whole PHP, no installation required at all. And as we're using PHP seven and newer, then you know, you'll be all good to go. So over the next few videos, we are going to look at the different ways to manipulate XML data using simple XML. So yeah, why would you want to use simple XML instead of trying to parse yourself trying to parse it yourself will be ridiculously difficult. So simple XML.

You know, lactate is built in its name, and like an external thing that you're using, I would still recommend it, even if it was an external thing, you know, you know, pre PHP five, because it's so lightweight and so essential that you be you'd be foolish not to use it, but because it's built in psych yet, last, just the way to do it. So yeah, that's it. Any questions? Feel free to me a message. And as usual, I look forward to seeing you in the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.