Encerrado

XML childNode Problem

I'm relatively new to XML and was having a problem. What I need is to extract nested element text from specific elements. For example, I want to extract all text in a "FONT" tag. But, if there are embedded tags between the opening and closing "FONT" tags, the XML extraction stops before the first embedded tag.

Here is an example of some code I'm using to exract the text in childNodes and append it to the string.

Public Function getText(el) As String

Dim i As Long

Dim s As String

For i = 0 To [url removed, login to view] - 1

If [url removed, login to view](i).nodeType = NODE_TEXT Then

s = s + [url removed, login to view](i).nodeValue

ElseIf [url removed, login to view](i).nodeType = NODE_ELEMENT & [url removed, login to view](i).tagName = "BR" Then

s = s + vbNullString

Else

s = s + getText([url removed, login to view](i))

End If

Next i

getText = s

End Function

I'm using the webbrowser control to get the HTML page.

I'm sure the answer is simple, hence the low max price. I'm just looking for a line of two of code or an explanation so I can do it myself.

## Deliverables

1) Code snippet I should be able to integrate into my own program.

## Platform

IE 5.0+

Habilidades: Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software, Visual Basic, XML, XSLT

Ver mais: two string problem, the string problem, string problem, line in problem, get length of string in c, element 14, webbrowser, relatively simple function, max element, php nested, embedded font, sure problem, php elseif, webbrowser html, element max, max elements, html extraction, extract max, html snippet, webbrowser control html, html webbrowser, xml simple program, max xml php, nested control, xml extraction

Acerca do Empregador:
( 1 comentário ) Slippery Rock, United States

ID do Projeto: #2957032

9 freelancers are bidding on average $4 for this job

johnsanderbeck

See private message.

$3.4 USD em 1 dia
(6 Comentários)
4.4
ambrosevw

See private message.

$4.25 USD em 1 dia
(27 Comentários)
4.3
seirus

See private message.

$3.4 USD em 1 dia
(36 Comentários)
4.0
captainjoe

See private message.

$4.25 USD em 1 dia
(13 Comentários)
3.4
hsswe1

See private message.

$4.25 USD em 1 dia
(8 Comentários)
2.5
tavor

See private message.

$4.25 USD em 1 dia
(2 Comentários)
1.7
ldgriff

See private message.

$3.4 USD em 1 dia
(0 Comentários)
0.0
vw605035vw

See private message.

$4.25 USD em 1 dia
(0 Comentários)
0.0
faadivw

See private message.

$3.4 USD em 1 dia
(0 Comentários)
0.0