Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - A (simple) XPath Question. [Thread Next] Re: A (simple) XPath Question.To: NULL Date: 12/7/2008 9:35:00 AM Here is another way (not as elegant as Martin's solution), /*[local-name() =3D 'ItemInformation']/*[local-name() =3D 'ItemDetails']/* [local-name() =3D 'Title'] Though this will cause a problem, if there are elements with same local name but different namespace URIs. But it seems this could work for you. Writing like this //*[local-name() =3D 'Title'] could have been easily acceptable, but writing local-name() function at every step is certainly inelegant. you can use what I wrote if you want ... On Dec 6, 8:05=A0pm, Bubba <bu...@nowhere.com> wrote: > Hi Group, > > I have been given a file in the following format: > > <ItemInformation xmlns=3D"http://tempuri.org/ItemInfo.xsd"> > =A0 =A0<ItemDetails> > =A0 =A0 =A0<Title>This is the item title</Title> > =A0 =A0 =A0<State>This is the item state</State> > =A0 =A0 =A0<ItemCost ... /> > =A0 =A0 =A0<ItemCost ... /> > =A0 =A0 =A0<ReOrder> > =A0 =A0 =A0 =A0 <MinLevel>25000</MinLevel> > =A0 =A0 =A0 =A0 <MaxLevel ... /> > =A0 =A0 =A0</ReOrder> > =A0 =A0</ItemDetails> > </ItemInformation> > > The ItemInfo.xsd file does not exist. But how do I extract the Title > element using XPath from this file? I've tried all manner of syntax but > never get any results, can anyone help here please. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
