Converting Text to XML

Asked

Viewed 52 times

0

I am building an rss reader for a blog where the xml file gives me the information of all the events that the blog presents (cultural events). recover the xml and extract the information is ok until the part where I have to recover the data from the events. The Feed kind of passes me everything in text form with HTML formatting inside a single tag (tag below)

<content:encoded><![CDATA[<p style="text-align: 

How do I extract this information in an organized way? because I want to extract title, event location, description and other information that is coming in this file. Which resource should I use? Thanks in advance.

  • Put an entire file sample here, please.

  • the file is very large but this is it: http://vomermo.com.br/feed/

  • What you’re seeing is HTML within your XML. This is used by certain feeds to make content more flexible. Take this HTML and use a parser to extract the content from it.

  • Okay, but using a parser gives me the ability to organize the content? for example: I create a class called Evendo in it has the properties of Descricao and Datalocal, can I extract this information from this parse in a standardized way? because let’s say I have 10 events and they’re all described in html form but no markup.

  • Some structure has to have in this HTML, otherwise there is no hope of doing any automatic conversion. Once identified this structure, you will have to create a converter.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.