/    Sign up×
Community /Pin to ProfileBookmark

How to remove set of tags plus content?

Dear all,

First, let me briefly explain what I am trying to do:

XMLTV is a simplified XML language to describe TV listings. There are various methods to “grab” such listings and programs to display the data. A sample section of code looks like this:

<programme channel=”itv2.itv.co.uk” start=”200506291400 +0100″
stop=”200506291430 +0100″>
<title>Emmerdale</title>

<desc>Viv finds out that Scott was planning to leave the village with Zoe.
Andy worries that things are moving too quickly with Debbie. Lesley
discovers a skeleton in Rose’s closet.</desc>

<credits>
<actor>Deena Payne</actor>

<actor>Ben Freeman</actor>

<actor>Leah Bracknell</actor>

</credits>

<category>Soap</category>

<length units=”minutes”>30</length>

<video>
<aspect>16:9</aspect>
</video>

<subtitles type=”teletext” />

</programme>

I would like to use this in a Palm program called WhatsOn, but do not need all the data the grabber provides. In fact, the resulting file is too big (5 M? for my PDA. This is why I need to remove various elements like <credits>…</credits>, <video>…</video> etc. to reduce the file size as much as possible.

I have not found a HTML or XML editor yet that lets me define a replace or delete operation based on tags used. It would be even more comfortable if I could tell the editor in a kind of script or macro to remove everything except information contained in a predefined set of tags.

Any suggestions?

Many thanks,

Holger Laux

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@holger_lauxauthorJul 08.2005 — Just to bring this back to the top of the list, since it dropped quite down without receiving an answer. ;-)
×

Success!

Help @holger_laux spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...