Jump to content

XML problem


Sasu

Recommended Posts

Hey there!

I have a problem getting value of a node. Here is the xml and script that I have:

<div> 
    <span class="title"><strong>Alan Walker</strong> – Faded (Amice Remix)</span> <em>(4:34)</em> 
</div> 

local node = xmlNodeGetChildren(xml, 0) 
if xmlNodeGetName(node) == "span" then 
    songName = xmlNodeGetValue(node) 
    outputChatBox(tostring(songName)) 
    artist = xmlNodeGetValue(xmlNodeGetChildren(node, 0)) 
end 

It returns the artist(inside node) correctly but for some reason the song name is not returned anything. I think '–' might have something to do with.

Hope you can help me guys, thanks.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...