Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting the length of a string 1

Status
Not open for further replies.

camjon

Technical User
Apr 2, 2008
17
US
I would like to know if anyone knows how to get the length of a string that is in an xml file. Here is an example of what im trying to do

<trip>florida</trip>
<population>12346569</population>

I want to go in a get the length of the charcters that are in between the tags. If anyone knows how to do this, any help would be greatly appreciated. Thank you.
 
A starting point:
Code:
myStr = "<trip>florida</trip>"
MsgBox myStr & ":" & InStrRev(myStr, "<") - InStr(myStr, ">") - 1

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are ya camjon . . .

What you ask is complicated by the many [blue]relational terms[/blue] which can occur in XML. These terms take the following form and have to be allowed for:
Code:
[blue] [purple][b]<[/b][/purple][i]relational term here [/i][purple][b]/>[/b][/purple][/blue]
You'll have to expand on [blue]PHV's[/blue] post to meet your end.

Out of curiosity . . . [blue]whats the point of this?[/blue] [surprise]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top