0

I am not able to understand what actually parsing the html means ?

As i understand - - it means that suppose we have any html file by parsing we can have the contents of the html file and we can edit them using parsing. Am i right ?? (parsing simply gives the idea about the contents and structure inside the file.)

I have one more question- - I also want to know that suppose i have html file contents stored in a stream suppose (inside IStream *HTMLContents - No matter for now that how i got these contents). Is there any process exist that using these file contents may i create the preview on any window/Dialog Box/Preview pane with the same way exactly as i get the view of that html file in the browser.(for now you can imagine that i have downloded the HTML File contents from any web page(or from any where-No matter- But i have contents of html file in my stream i am sure about it) and i want to render that html file view in my own created window/Dialog Box/Preview pane(i mean it should view exactly as it appears in browser-Yes i know it won't be avle to display some pictures in html file but thats not a problem for me). How to do that ?? (I am using Visual c++ for my accomplishing my task)

Sss
  • 1,519
  • 8
  • 37
  • 67

2 Answers2

1

Parsing basically means analyzing any data. When you parse HTML, it could be that you are figuring out where all the various elements are located and what do they do.

As for displaying HTML, it depends on what do you want to do: If you want to open the file in your browser, use something like this. As for displaying HTML directly in your form, I don't really know of any other way than parsing the HTML and creating your own web rendering engine. Good luck and have fun with that I guess.

Community
  • 1
  • 1
Fenixp
  • 645
  • 5
  • 22
  • you mean if istore the Html file contents in my own created stream that can be also called as parsing (i mean i have parsed the html file now by storing it in my own created stream) am i right ? – Sss Aug 02 '13 at 08:19
  • Shekhar Singh SHEKHAWAT: No, storing is just that - storing. Parsing means that you dig trough the data and figure out what do they mean. – Fenixp Aug 02 '13 at 08:30
  • @ Fenixp y figuring out you mean having knowledge about its structure and body inside the file ?? (i mean header format and data format etc.).I am sorry for this but still that was confusing for me. – Sss Aug 02 '13 at 08:35
  • 1
    Shekhar Singh SHEKHAWAT: Yes, that's exactly what I meant. When you parse a HTML file, your code should somehow acknowledge individual parts of the HTML, like tags, their order, attributes etc. - any of these will do. – Fenixp Aug 02 '13 at 08:38
1

Parse HTML means build object model such as DOM: https://en.wikipedia.org/wiki/Document_Object_Model in your program

podshumok
  • 1,649
  • 16
  • 20
  • I have create such DOM for html file. I mean i have to parse html file and then i using the contents of that html file i have to create a preview in my own designed form/dialobbox.. any suggestion for that how to do these two ?? – Sss Aug 02 '13 at 08:47