ale

Advice about XML

8 posts in this topic

Hello guys,

 

Can anybody tell me some practical example of xml???

 

I'm new with it. I know what is xml, syntax etc. but I am not so clear with using the same....

 

Thanks...

Share this post


Link to post
Share on other sites

It's just for data storage really. An XML document describes a set of data. It's similar to storing data in a database, or spreadsheet, or whatever else. A difference between XML and a spreadsheet is that XML can have multiple levels of child/parent relationships, where a spreadsheet is more of just a set of rows and columns.

Share this post


Link to post
Share on other sites

I know it @justsomeguy, but I cannot understand where I should put it, I mean where in HTML, PHP etc. I read about XML on W3Schools, but there is no clearly explanation for example where I can find an xml doc of some page..

Share this post


Link to post
Share on other sites

It's just a way to organize textual data in a file or stream so that it's easy to understand and manage. If textual data is passed between two computer systems a clear description of the data helps prevent confusion. XML can be used to clearly describe data since it wraps each item of data in a descriptive tag.

 

https://en.wikipedia.org/wiki/XML

Share this post


Link to post
Share on other sites

PHP can read XML documents using the DOMDocument class, Javascript natively supports loading XML documents and accessing elements with DOM methods.

Share this post


Link to post
Share on other sites

Because it is textual, its not restricted to specific program, for viewing it can be opened in your basic text editor program in a easy readable layout in all O/S for editing, which means it can be used to convert data in a database to xml, and then back again on another system, it can be read by program such as excel into a spreadsheet layout with headers and all to inspect data. It is just a easy way to store, transport and read without having a need of specific program to access the data.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now