I responded before seeing the other responses. So, you have three ways of doing the same thing… ;-)
On Nov 20, 2014, at 8:58 AM, Harbs <[email protected]> wrote: > You need to check for [email protected]() to see if it exists. > > On Nov 19, 2014, at 11:25 PM, mark goldin <[email protected]> wrote: > >> But I only want to check if both attr1 and attr1 exist. No value is known. >> >> On Wed, Nov 19, 2014 at 3:15 PM, Alex Harui <[email protected]> wrote: >> >>> I’m not sure your example was valid. If you instead had: >>> >>> Var xml:XML = <Project Name="Project1"> >>> <Subproject Name=“Subproject1" ID="2293" attr1="1.00" attr2="2.00"/> >>> <Subproject Name=“Subproject2" ID="2294" attr1="1.00" attr2=“3.00"/> >>> <Subproject Name=“Subproject3" ID="2295" attr1=“2.00" attr2="2.00"/> >>> </Project> >>> >>> Then I think you would use >>> xml.SubProject.(@attr1==“1.00” && @attr2==“2.00”).@ID >>> >>> >>> >>> On 11/19/14, 11:19 AM, "mark goldin" <[email protected]> wrote: >>> >>>> Let's say I have the following code: >>>> <Project Name="Project1" ID="2293" attr1="1.00" attr2="2.00"> >>>> <Subproject Name="Subproject1"/> >>>> <Subproject Name="Subproject2"/> >>>> <Subproject Name="Subproject3"/> >>>> </Project> >>>> >>>> I'd lit to find ID="2293" based on a fact that the element has both attr1 >>>> and attr2. >>>> >>>> Thanks for help. >>> >>> >
