arrays - Compare largest number among a list of XML input parse using Excel VBA -


   set node = xmldoc.selectnodes("//attribute[@name='xship_location']")    each n in node         result = n.text         logmsg = "xship_location: " & result         call printlog(logmsg, logline)    next n 

for every line in xml contains name=xship_location, value of attribute read. how can compare list of results read xml , pick highest number?

example of result = 1, 2,1,3,5,4,1,2

i find largest number list of inputs read xml 5 in case using .

can kind enough newbie? thanks

why not add second variable capture maximum value, each iteration through loop, compare maximum result.... such

    result = n.text   '->your code     if result > max max = result     logmsg = "xship_location: " & result    '--> code 

note if n not number, throw error.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -