Hello friends
I would love to have your help with a blocking for hours.
In summary, I have to read an XML file and retrieve information with the VB.Net language.
I would like to recover the "name", the "checkvalue" and the "compositekey"
That's the structure of my xml file:
<supercollection name="BF000000.hks"> <collections> <collection maxdukptkeyindex="17" maxmskeyindex="13" merchantid="" applicationcertificate="Only Collection Certificate" applicationname="Only Collection Application" name="Only Collection"> <mskeys> <key index="1" checkvalue="E8F71A" variantindex="0" verifycheckvalue="yes" keylength="32" compositekey="BA03BDBDF091092C26B9D22A2922F504" usage="1" encryptionmode="TECB" name="Key"> <type>Master</type> </key> </mskeys> <dukptkeys></dukptkeys> </collection> </collections> </supercollection>
cheikh06
0
Newbie Poster
Recommended Answers
Jump to PostI've never had much luck working with XML and I'm sure there is a better way to do this via Linq but you could try a regular expression approace as in
Private Function GetField(name As String) As String Dim pattern = name & "=""(.*?)""" Dim rex = …
Jump to PostDang. I always complain when other people do this and now I did it. I left out the import when I posted the code. Please add the following:
Imports System.Text.RegularExpressions
I'll see if I can figure out the Linq version. I'll post it later if I have …
All 5 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
rproffitt
commented:
This is my story. Client hands me XML, Microsoft XMLreader blows up. I parse it with my own code.
+15
cheikh06
0
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
cheikh06
commented:
Thank you for your help with this function but it returns me not found
+0
cheikh06
0
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
cheikh06
commented:
thank you very much it works well with your function
+0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.