XML/XPath: Difference between revisions
Content deleted Content added
Line 75: | Line 75: | ||
set {theName, theAttributes, theElements} to {i's name, {}, i's XML elements} |
set {theName, theAttributes, theElements} to {i's name, {}, i's XML elements} |
||
try |
try |
||
set theValue to i's value |
set theValue to i's value |
||
set theValue to theValue |
set theValue to theValue |
||
on error |
on error |
||
set theValue to null |
set theValue to null |
||
Line 87: | Line 87: | ||
end tell |
end tell |
||
if (count of theElements) > 0 then |
if (count of theElements) > 0 then |
||
--set end of R to my getXMLElementsByName(theElements, theNameToFind) |
|||
set R to R & my getXMLElementsByName(theElements, theNameToFind) |
set R to R & my getXMLElementsByName(theElements, theNameToFind) |
||
else |
else |
||
--if theName = theNameToFind then set end of R to theValue |
|||
if theName = theNameToFind then set R to R & theValue |
if theName = theNameToFind then set R to R & theValue |
||
end if |
end if |