Thread View: borland.public.delphi.xml
10 messages
10 total messages
Started by Sergio Pottstock
Tue, 17 Jun 2008 15:09
Atom read
Author: Sergio Pottstock
Date: Tue, 17 Jun 2008 15:09
Date: Tue, 17 Jun 2008 15:09
18 lines
1286 bytes
1286 bytes
Hi
I build RSS reader with delphi 7 using TXMLDocument component, but I'cant
read ATOM protocol :
With RSS :
StartItemNode :=
XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('item');
With ATOM:
StartItemNode :=
XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
StartItem = NIL
Any idea?
PTTK
Re: Atom read
Author: Remy Lebeau (TeamB)
Date: Tue, 17 Jun 2008 17:13
Date: Tue, 17 Jun 2008 17:13
25 lines
1766 bytes
1766 bytes
"Sergio Pottstock" <pttk@pttk.cl> wrote in message
news:4857d362$1@newsgroups.borland.com...
> I build RSS reader with delphi 7 using TXMLDocument component,
> but I'cant read ATOM protocol :
Why not? You need to be more specific. What exactly are you having trouble
with?
> With RSS :
> StartItemNode :=
> XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('item');
>
> With ATOM:
> StartItemNode :=
> XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
>
> StartItem = NIL
Just a guess, what you are likely looking for the nodes in the wrong place.
What does the actual XML look like?
Gambit
Re: Atom read
Author: Sergio Pottstock
Date: Tue, 17 Jun 2008 21:39
Date: Tue, 17 Jun 2008 21:39
47 lines
1916 bytes
1916 bytes
Hi,
Thank, I'cant found "Node", when execute:
StartItemNode :=
XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
Allways is NIL
Thank
PTTK
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escribi� en el mensaje
news:4857f107$1@newsgroups.borland.com...
>
> "Sergio Pottstock" <pttk@pttk.cl> wrote in message
> news:4857d362$1@newsgroups.borland.com...
>
> > I build RSS reader with delphi 7 using TXMLDocument component,
> > but I'cant read ATOM protocol :
>
> Why not? You need to be more specific. What exactly are you having
trouble
> with?
>
> > With RSS :
> > StartItemNode :=
> > XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('item');
> >
> > With ATOM:
> > StartItemNode :=
> > XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
> >
> > StartItem = NIL
>
> Just a guess, what you are likely looking for the nodes in the wrong
place.
> What does the actual XML look like?
>
>
> Gambit
>
>
Re: Atom read
Author: Remy Lebeau (TeamB)
Date: Tue, 17 Jun 2008 22:58
Date: Tue, 17 Jun 2008 22:58
17 lines
1468 bytes
1468 bytes
"Sergio Pottstock" <pttk@pttk.cl> wrote in message
news:48582ed7@newsgroups.borland.com...
> Thank, I'cant found "Node", when execute:
>
> StartItemNode :=
> XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
>
> Allways is NIL
Like I said, you are looking for the 'entry' node at the wrong location in
the XML. That is the only way FindNode() would return a nil pointer.
Again, please show the actual XML you are trying to parse.
Gambit
Re: Atom read
Author: Sergio Pottstock
Date: Wed, 18 Jun 2008 15:35
Date: Wed, 18 Jun 2008 15:35
28 lines
1704 bytes
1704 bytes
Thank:
I try read this : http://pttk.blogspot.com/atom.xml for example
PTTK
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escribi� en el mensaje
news:4858434c$1@newsgroups.borland.com...
>
> "Sergio Pottstock" <pttk@pttk.cl> wrote in message
> news:48582ed7@newsgroups.borland.com...
>
> > Thank, I'cant found "Node", when execute:
> >
> > StartItemNode :=
> > XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
> >
> > Allways is NIL
>
> Like I said, you are looking for the 'entry' node at the wrong location in
> the XML. That is the only way FindNode() would return a nil pointer.
> Again, please show the actual XML you are trying to parse.
>
>
> Gambit
>
>
Re: Atom read
Author: Remy Lebeau (TeamB)
Date: Wed, 18 Jun 2008 18:05
Date: Wed, 18 Jun 2008 18:05
21 lines
1718 bytes
1718 bytes
"Sergio Pottstock" <pttk@pttk.cl> wrote in message
news:48592b00@newsgroups.borland.com...
> I try read this : http://pttk.blogspot.com/atom.xml for example
As I keep telling you, you are looking in the wrong place for the "entry"
nodes. You need to search the immediate chilren of the DocumentElement.
But you are searching the children of the first child of the DocumentElement
instead. That is why FindNode() returns nil. In other words, you need to
change this line:
StartItemNode :=
XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
To this instead:
StartItemNode := XMLDoc.DocumentElement.ChildNodes.FindNode('entry');
Gambit
Re: Atom read
Author: Sergio Pottstock
Date: Wed, 18 Jun 2008 18:18
Date: Wed, 18 Jun 2008 18:18
34 lines
1998 bytes
1998 bytes
Thank!!!
It work now.
Thank
PTTK
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escribi� en el mensaje
news:48594e47$1@newsgroups.borland.com...
>
> "Sergio Pottstock" <pttk@pttk.cl> wrote in message
> news:48592b00@newsgroups.borland.com...
>
> > I try read this : http://pttk.blogspot.com/atom.xml for example
>
> As I keep telling you, you are looking in the wrong place for the "entry"
> nodes. You need to search the immediate chilren of the DocumentElement.
> But you are searching the children of the first child of the
DocumentElement
> instead. That is why FindNode() returns nil. In other words, you need to
> change this line:
>
> StartItemNode :=
> XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
>
> To this instead:
>
> StartItemNode := XMLDoc.DocumentElement.ChildNodes.FindNode('entry');
>
>
> Gambit
>
>
Re: Atom read
Author: Sergio Pottstock
Date: Wed, 18 Jun 2008 19:06
Date: Wed, 18 Jun 2008 19:06
74 lines
3929 bytes
3929 bytes
Now I confuse with this:
<title type='text'>HP anuncia iPAQ 914</title>
Read OK with : ANode.ChildNodes['title'].Text;
<content type='html'><DIV><FONT face=Arial size=2> <TABLE
cellSpacing=2 cellPadding=0 width=462 border=0> <TBODY> <TR
align=left> <TH class=titulo-not scope=col
colSpan=2></TH></TR> <TR> <TH vAlign=top
scope=col align=left><IMG hspace=5
src="http://www.diarioti.com/sisimg/18050b_hpipaq.gif" align=left
border=1>&nbsp;<SPAN class=titulo-head><BR>La serie HP
IPAQ 914 utiliza el sistema operativo Microsoft Windows Mobile 6.1
Professional para acceder a las aplicaciones profesionales m�s
comunes.</SPAN> <SPAN
class=texto-detalle><BR><BR></SPAN></TH></TR&g
t;</TBODY></TABLE></FONT></DIV>El dispositivo
utiliza una conexi�n inal�mbrica tri-banda UMTS/HSDPA y cuatri-banda
GSM/GPRS/EDGE que permite al usuario las comunicaciones por voz y acceso a
Internet en cualquier parte, mientras que la tecnolog�a integrada Bluetooth
y Wi-Fi ofrece total conectividad.<BR><BR>El dispositivo
dispone de pantalla t�ctil y una rueda de cinco direcciones que permite
navegar a trav�s de men�s y emails. Las aplicaciones de serie Cyberon Voice
Commander y HP Voice Reply dejan que el usuario env�e mails y ejecute otro
tipo de comandos por voz sin necesidad de tocar el
dispositivo.<BR></content>
Read OK with : ANode.ChildNodes['content'].Text;
<author><name>Sergio
Pottstock</name><email>noreply@blogger.com</email></author>
Read OK with : ANode.ChildNodes['author'].ChildNodes['name'].Text;
<link rel='alternate' type='text/html'
href='http://pttk.blogspot.com/2008/06/hp-anuncia-ipaq-914.html' title='HP
anuncia iPAQ 914'/>
I'cant read with : ANode.ChildNodes['link'].Text;
Any idea?
Thank
PTTK
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escribi� en el mensaje
news:48594e47$1@newsgroups.borland.com...
>
> "Sergio Pottstock" <pttk@pttk.cl> wrote in message
> news:48592b00@newsgroups.borland.com...
>
> > I try read this : http://pttk.blogspot.com/atom.xml for example
>
> As I keep telling you, you are looking in the wrong place for the "entry"
> nodes. You need to search the immediate chilren of the DocumentElement.
> But you are searching the children of the first child of the
DocumentElement
> instead. That is why FindNode() returns nil. In other words, you need to
> change this line:
>
> StartItemNode :=
> XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('entry');
>
> To this instead:
>
> StartItemNode := XMLDoc.DocumentElement.ChildNodes.FindNode('entry');
>
>
> Gambit
>
>
Re: Atom read
Author: Remy Lebeau (TeamB)
Date: Thu, 19 Jun 2008 19:32
Date: Thu, 19 Jun 2008 19:32
24 lines
1883 bytes
1883 bytes
"Sergio Pottstock" <pttk@pttk.cl> wrote in message
news:48595c84$1@newsgroups.borland.com...
> <link rel='alternate' type='text/html'
> href='http://pttk.blogspot.com/2008/06/hp-anuncia-ipaq-914.html' title='HP
> anuncia iPAQ 914'/>
>
> I'cant read with : ANode.ChildNodes['link'].Text;
That is not a text node like the others are, so there is nothing for the
Text property to access. You have to use the Attributes property instead,
ie:
ANode.ChildNodes['link'].Attributes['rel']
ANode.ChildNodes['link'].Attributes['type']
ANode.ChildNodes['link'].Attributes['href']
ANode.ChildNodes['link'].Attributes['title']
Gambit
Re: Atom read
Author: Sergio Pottstock
Date: Thu, 19 Jun 2008 20:07
Date: Thu, 19 Jun 2008 20:07
37 lines
2116 bytes
2116 bytes
Thank !! Sorry, I am inexpert in XLM document Thank PTTK "Remy Lebeau (TeamB)" <no.spam@no.spam.com> escribi� en el mensaje news:485ab491$1@newsgroups.borland.com... > > "Sergio Pottstock" <pttk@pttk.cl> wrote in message > news:48595c84$1@newsgroups.borland.com... > > > <link rel='alternate' type='text/html' > > href='http://pttk.blogspot.com/2008/06/hp-anuncia-ipaq-914.html' title='HP > > anuncia iPAQ 914'/> > > > > I'cant read with : ANode.ChildNodes['link'].Text; > > That is not a text node like the others are, so there is nothing for the > Text property to access. You have to use the Attributes property instead, > ie: > > ANode.ChildNodes['link'].Attributes['rel'] > > ANode.ChildNodes['link'].Attributes['type'] > > ANode.ChildNodes['link'].Attributes['href'] > > ANode.ChildNodes['link'].Attributes['title'] > > > Gambit > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads