E
Edu
Hi,
Can anybody help me with this problem? :
I'v got a database of news in an XML file that looks like:
<?xml version='1.0' encoding="ISO-8859-1"?>
<news>
<new id='XXYYYZZZZZZTTT'>
<topic>sport</topic>
<language l='es'>
<headline>Aquí va el titular</headline>
<abstract>Aquí va el resumen de la noticia</abstract>
<data>Pues la noticia en si misma</data>
</language>
<language l='en'>
<headline>Here the headline</headline>
<abstract>Put here the abstract</abstract>
<data>The news in itself</data>
</language>
</new>
</news>
we have an element root <news> with a repository of news which can be
written in different languages and are related to different topics (sports,
weather, etc.). What I want is a servlet taht serve XML pages containing
only news of desired topic and desired language. For example:
http://myserver.com/news/servlet/MyServlet?topic=sport&language=es returns:
<?xml version='1.0' encoding="ISO-8859-1"?>
<news>
<new id='XXYYYZZZZZZTTT'>
<topic>sport</topic>
<language l='es'>
<headline>Aquí va el titular</headline>
<abstract>Aquí va el resumen de la noticia</abstract>
<data>Pues la noticia en si misma</data>
</language>
</new>
</news>
The problem is not the retrieval of query parameters (topic and language),
the problem is the operation with XML data.
Thanks in advance!
Edu
Can anybody help me with this problem? :
I'v got a database of news in an XML file that looks like:
<?xml version='1.0' encoding="ISO-8859-1"?>
<news>
<new id='XXYYYZZZZZZTTT'>
<topic>sport</topic>
<language l='es'>
<headline>Aquí va el titular</headline>
<abstract>Aquí va el resumen de la noticia</abstract>
<data>Pues la noticia en si misma</data>
</language>
<language l='en'>
<headline>Here the headline</headline>
<abstract>Put here the abstract</abstract>
<data>The news in itself</data>
</language>
</new>
</news>
we have an element root <news> with a repository of news which can be
written in different languages and are related to different topics (sports,
weather, etc.). What I want is a servlet taht serve XML pages containing
only news of desired topic and desired language. For example:
http://myserver.com/news/servlet/MyServlet?topic=sport&language=es returns:
<?xml version='1.0' encoding="ISO-8859-1"?>
<news>
<new id='XXYYYZZZZZZTTT'>
<topic>sport</topic>
<language l='es'>
<headline>Aquí va el titular</headline>
<abstract>Aquí va el resumen de la noticia</abstract>
<data>Pues la noticia en si misma</data>
</language>
</new>
</news>
The problem is not the retrieval of query parameters (topic and language),
the problem is the operation with XML data.
Thanks in advance!
Edu