0

I have created a little RSS-Reader, which displays content with the help of a Stackpanel and TextBox:

<StackPanel Grid.Column="1" Orientation="Vertical" Width="600">
    <TextBlock Text="{Binding Title}" FontWeight="ExtraBold" Width="600"/>
    <TextBlock Text="{Binding Description}" TextWrapping="Wrap" Width="600"/>
    <TextBlock nav:NavigationService.Text="{Binding Link}" Width="600"/>
    <TextBlock Text="{Binding PublicationDate}" HorizontalAlignment="Right" FontWeight="Thin"/>
</StackPanel>

I won't go into too much detail here, but this is how it looks like:

enter image description here

As you can see, there are HTML-Tags like <p> and <u>, which I would like to parse correctly. Doing that in the application itself could be problematic, as I'd have to check for every possible tag.

Is there some sort of component which does that automatically? If not, what is the best approach to this problem?

1 Answer 1

1

The HTML Agility Pack is perfect for things like that. Especially since it can ignore smaller errors in the HTML.

They have a lot of examples online, they only thing you need is basic knowledge of your data structure and a bit of XPath if you want to fully utilize all features.

Sign up to request clarification or add additional context in comments.

1 Comment

I had a look at it and it does seem to be the right thing. Thanks for the answer!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.