Jump to content

How do browsers read XML?


srkumar
 Share

Recommended Posts

I suppose, by interpretting the text contained in the file. It's probably a complicated process of defining what a tag is (a piece of text beggining with '<' and ending with '>'), what entities are (pieces of text that begin with '&' and end with ';' and that have a Unicode character assigned), organizing the data of attributes and within text tags into objects...

Link to comment
Share on other sites

Hi...Can anyone explain how do browsers read XML?Thanks in Advance,srkumar
The question you're asking is rather vague. You should know that the more you're wondering how things are done behind the scenes, the more your brain might suffer if haven't been a user beforehand.But if you're really interested in what's under the hood - browsers have the so called "XML parser". That is a program that reads XML files by reading the file as text, and translating it into "nodes" as descibed in the XML specification, failing if the file doesn't meet the well formed requirement, also descibed in the specification. Once they have translated the XML into a node tree, they expose that information to the user with some sort of an API (i.e. a set of functions and/or classes in a language that an application author can use to interact with another application, in this case, the XML parser) - most often DOM.
Link to comment
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
 Share

×
×
  • Create New...