Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Newbie: Extracting text just from first element [Thread Next] Re: Newbie: Extracting text just from first elementTo: NULL Date: 7/2/2004 10:44:00 AM You may want xpath. name/text() name/last will return 'Richard' and Pierson consecutively. Concatenation, you may simply want a & b syntax in VB or VBScript. Also there is a concat() function in XSLT. "Microsoft News" <gustavorios@h...> wrote in message news:uaqiJS9XEHA.2812@T...... > Hello all! > > I have a simple question I can't figure it out how to do it. > Here is a portion of my xml > > <name> > Richard > <last>Pierson</last> > </name> > > I am trying to use something like this using msxml to get just the first > name: > > Set objNodeList = xml.getElementsByTagName("name") > First_Name = objNodeList.Item(0).text > > > Now according to documentation text attribute will concatenate all "name" > descendant and return a single string concatenated. > First: How can I get just the first portion of <name> ? In my case > "Richard" > Second: If I want to get "Richard Pierson" how do I put the space between > concatenations? > > Thanks for your help? > > Gus. > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
