From aruiz@isys.dia.fi.upm.es Tue Mar 13 15:36:54 2001 Received: from goofy.fi.upm.es (goofy.fi.upm.es [138.100.8.23]) by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f2DEasZ04261 for ; Tue, 13 Mar 2001 15:36:54 +0100 (MET) Received: from conversion.relay.fi.upm.es by relay.fi.upm.es (PMDF V6.0-24 #46251) id <01K15IX8RSI8000I3Q@relay.fi.upm.es> for prolog@swi.psy.uva.nl; Tue, 13 Mar 2001 15:35:50 +0100 (MET) Received: from mistral.dia.fi.upm.es (mistral.dia.fi.upm.es [138.100.11.194]) by relay.fi.upm.es (PMDF V6.0-24 #46251) with ESMTP id <01K15IX7U810000IEN@relay.fi.upm.es> for prolog@swi.psy.uva.nl; Tue, 13 Mar 2001 15:35:49 +0100 (MET) Received: from isys.dia.fi.upm.es by mistral.dia.fi.upm.es (8.8.8/FI-4.1) Tue, 13 Mar 2001 15:35:48 +0100 Date: Tue, 13 Mar 2001 15:38:52 +0100 From: Alberto Ruiz Cristina To: Swi Prolog Mailing List Message-id: <3AAE30FC.777A2F30@isys.dia.fi.upm.es> MIME-version: 1.0 X-Mailer: Mozilla 4.73 [en] (WinNT; I) Content-type: text/html; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en Subject: [SWIPL] XML parser (again) I am sorry: I explained myself awfully! I just got 2 minutes before I left and nobody can understand my question!

Consider this DTD:

<?xml version="1.0" encoding="UTF-8"?>

<!ELEMENT example (alberto,other)>

<!ELEMENT alberto (#PCDATA)>

<!ELEMENT other (alberto)>

And consider also this XML document:

<example>
    <alberto>Content 1</alberto>
    <other>
        <alberto>Content 2</alberto>
    </other>
</example>
I want to develop a prolog parser based on the Swi Xml Package, so that entering the DTD, the XML document and an element identifier, it returned the desired element from the prolog structure.
What I don´t know (and I´m realising that this is more a XML question than a Prolog question) is how to identify elements, I mean, how will the parser know if I want Content 1 or Content 2 if I enter the element name "alberto".

Thank you again!!

Alberto Ruiz Cristina