I have this XML document
<xml>
<word>
<threeletter>rip</threeletter>
<fourletter>Pier</fourletter>
<fiveletter>Spire</fiveletter>
<sixletter>Spider</sixletter>
</word>
<word>
<threeletter>rip</threeletter>
<fourletter>Pier</fourletter>
<fiveletter>Spire</fiveletter>
<sixletter>Spider</sixletter>
</word>
<word>
<threeletter>rip</threeletter>
<fourletter>Pier</fourletter>
<fiveletter>Spire</fiveletter>
<sixletter>Spider</sixletter>
</word>
</xml>
Let’s assume that each element inside the word has different values.
is it possible in javascript to retrieve all of these values? then store them in an array? or a variable? if so how? because I am planning to compare them with user inputs
It’s not at all clear how you want your array structured.
Here is one example that store multiple arrays in an object
To access 3 letter array use
words.threeletterDemo: http://jsfiddle.net/5EnR2/