nickkjordan / wruw-iphone-app

iPhone app for WRUW 91.1 Cleveland, OH http://www.wruw.org/
1 stars 2 forks source link

Blank Song Fields in ArchiveTableVC #1

Closed nickkjordan closed 10 years ago

nickkjordan commented 10 years ago

Blank cells show up in archives of playlists due to song comments input by the programmer. Example below, programmer had a comment for Emerson, Lake & Powell, as well as for Pink Floyd.

image

Due to tr nodes that have an id=comments_####### as shown below. Fix would be to filter out all nodes with an id tag.

image

nickkjordan commented 10 years ago

Fixed by including the condition with not(contains(@id, 'comments'). This ignores any nodes that contain the string 'comments' in the id of the node. This fix had to be in union with the previous conditional for the tr node, which was that it's position in the childNodeArray was greater than 1. Thus, fix is //tr[position()>1 and not(contains(@id, 'comments'))]

Sources: http://stackoverflow.com/questions/1550981/how-do-you-use-not-in-xpath http://www.w3schools.com/xpath/xpath_operators.asp