Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Xanth

HTML Parsing

This topic is 5755 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Actually it''s not so much parsing as it is "reading", what I mean is, HTML files are full of "" (for the tag attributes), how is it that this is possible without escaping the quotes (\" \") ??

Share this post


Link to post
Share on other sites
Advertisement
I''m not sure what you mean but I think what you''re trying to say is: How come the "" in HTML dont look like i.e.


You have to remeber that HTML is read by the web browser and not the computer so anything goes

hope that helps..

Share this post


Link to post
Share on other sites
Yes, but the browser has to parse the HTML as well, its still a string of some kind in a program on the computer.

Also, XML is parsed by all sorts of programs, other than browsers.

Share this post


Link to post
Share on other sites
When you make up a string in a source code file, you are using \" as an escape so that the COMPILER doesn''t read the quotation marks for their main purpose, but instead as a literal quotating that gets placed in the string.

HTML source files are tagged and context sensitive. For example, I can write " "" """ "" as many times as I want and the Web Browser''s rendering processes will still regard it as arbitrary text that gets displayed. However, the arrows are tag markers, and if I wanted to imbed them in normal text, I''d need an escape character like I did in the compiler.

What you should basically regard this as is a Different Program, Different Rules situation.

-> Will Bubel
-> Machine wash cold, tumble dry.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!