HLRosenberger
asked on
XML and Xpath
Using VB.NET, I want obtain a collection of all xml elements within a file that have the same value for a certain attribute. See XML below. For example, I want all 'text' elements whose 'y' attribute is 292.969. How do I do this?
Thanks
-<font src="Referral - Rosenbeger.pdf_font1.ttf" face="CHVVWW+Helvetica-Bol d" size="8">
<text height="9.217" width="33.455" y="277.219" x="20.25">FATHER</text>
<text height="9.217" width="23.372" y="277.219" x="103.5">RACE</text>
<text height="9.217" width="35.295" y="277.219" x="194.25">GENDER</text>
<text height="9.217" width="43.997" y="277.219" x="237">AGE (DOB)</text>
<text height="9.217" width="16.963" y="277.219" x="300">SSN</text>
<text height="9.217" width="29.337" y="277.219" x="324.75">PHONE</text>
<text height="9.217" width="40.334" y="277.219" x="381">ADDRESS</text>
</font>
-<font src="Referral - Anthony 639874.pdf_font2.ttf" face="RGIPLP+Helvetica" size="8">
<text height="9.217" width="4.588" y="292.969" x="20.25">2</text>
<text height="9.217" width="66.025" y="292.969" x="31.5">Jackson, Robert</text>
<text height="9.217" width="85.273" y="292.969" x="103.5">Black/African American</text>
</font>
-<font src="Referral - Anthony 639874.pdf_font2.ttf" face="RGIPLP+Helvetica" size="8" color="#A9A9A9">
<text height="9.217" width="5.958" y="308.719" x="111.002">N</text>
</font>
-<font src="Referral - Anthony 639874.pdf_font2.ttf" face="RGIPLP+Helvetica" size="8">
<text height="9.217" width="16.501" y="308.719" x="122.211"> Hisp</text>
<text height="9.217" width="17.879" y="292.969" x="194.25">Male</text>
<text height="9.217" width="58.245" y="292.969" x="237">25 (06/10/1989)</text>
<text height="9.217" width="221.812" y="292.969" x="324.75">267-111-2222 100 Main Street, XZY PA, 19000</text>
<text height="9.217" width="4.588" y="324.469" x="20.25">3</text>
<text height="9.217" width="63.279" y="324.469" x="31.5">Anthony, Michael</text>
<text height="9.217" width="85.273" y="324.469" x="103.5">Black/African American</text>
</font>
Thanks
-<font src="Referral - Rosenbeger.pdf_font1.ttf" face="CHVVWW+Helvetica-Bol
<text height="9.217" width="33.455" y="277.219" x="20.25">FATHER</text>
<text height="9.217" width="23.372" y="277.219" x="103.5">RACE</text>
<text height="9.217" width="35.295" y="277.219" x="194.25">GENDER</text>
<text height="9.217" width="43.997" y="277.219" x="237">AGE (DOB)</text>
<text height="9.217" width="16.963" y="277.219" x="300">SSN</text>
<text height="9.217" width="29.337" y="277.219" x="324.75">PHONE</text>
<text height="9.217" width="40.334" y="277.219" x="381">ADDRESS</text>
</font>
-<font src="Referral - Anthony 639874.pdf_font2.ttf" face="RGIPLP+Helvetica" size="8">
<text height="9.217" width="4.588" y="292.969" x="20.25">2</text>
<text height="9.217" width="66.025" y="292.969" x="31.5">Jackson, Robert</text>
<text height="9.217" width="85.273" y="292.969" x="103.5">Black/African American</text>
</font>
-<font src="Referral - Anthony 639874.pdf_font2.ttf" face="RGIPLP+Helvetica" size="8" color="#A9A9A9">
<text height="9.217" width="5.958" y="308.719" x="111.002">N</text>
</font>
-<font src="Referral - Anthony 639874.pdf_font2.ttf" face="RGIPLP+Helvetica" size="8">
<text height="9.217" width="16.501" y="308.719" x="122.211"> Hisp</text>
<text height="9.217" width="17.879" y="292.969" x="194.25">Male</text>
<text height="9.217" width="58.245" y="292.969" x="237">25 (06/10/1989)</text>
<text height="9.217" width="221.812" y="292.969" x="324.75">267-111-2222 100 Main Street, XZY PA, 19000</text>
<text height="9.217" width="4.588" y="324.469" x="20.25">3</text>
<text height="9.217" width="63.279" y="324.469" x="31.5">Anthony, Michael</text>
<text height="9.217" width="85.273" y="324.469" x="103.5">Black/African American</text>
</font>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi HLRosenberger;
To your last post, "Do you is XPATH a better way to go?", the selector for the node is simple and no need to use XPath in MHO.
To your last post, "Do you is XPATH a better way to go?", the selector for the node is simple and no need to use XPath in MHO.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanksl
ASKER