- Home /
Html elements(info from webpage)
Hello problem is to get some information from webpage but i'm not sure about that how do to something like that.
So i ask here some help, I hope someone know the answer and share that with me. when Code is:
<div id="post_container">
<div class="inner_post">
<h2><a href="http://something/lello">Your seen</a></h2>
</div>
<div class="inner_post">
<h2><a href="http://something/holalo">Your Ted</a></h2>
</div>
<div class="inner_post">
<h2><a href="http://something/isrrrel">Rella Hilla</a></h2>
</div>
<div class="inner_post">
<h2><a href="http://something/BinDin">Maka ronu</a></h2>
</div>
</div>
how i can make that code take information under class "inner_post".
i need get "Your seen", "Your Ted", "Rella Hilla", "Maka ronu" somehow out from this webpage but i don't really know how.
Answer by phil_me_up · Jan 10, 2016 at 01:18 PM
Assuming that you're able to read in the contents of the HTML, it should be be a simple case of parsing the data.
You can use System.Xml to traverse the XML markup to the node you're interested in and extract the node your interested in.
This approach will mean that your HTML must be formatted correctly (proper closing tags etc).
If you google for c# xml parser or Unity Xml parser you should be able to find enough information to get you going.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
List/buttons 1 Answer
Programming 2D buttons 3 Answers
Problems with the XML Serializer 1 Answer