This is my code:
(define p (read(open-input-file "starbucks4.sxml")))
(define get-artifacts
(lambda (l)
(member (list 'opm:artifact) l)))
(get-artifacts p)
I was told that the member function searches completely throughout a list. In the .sxml document there is a complicated list that has many elements called "opm:artifact" however this method returns #f and no list.
Can anyone see what I am doing wrong?
Sample of .sxml file:
(opm:account ((ref "detailedAccount")))
"\n "
(opm:label ((value "Provide other Beverage")))
"\n ")
"\n ")
"\n "
(opm:artifacts
()
"\n "
(opm:artifact
((id "a1"))
"\n "
(opm:account ((ref "detailedAccount")))
"\n "
(opm:label ((value "order")))
"\n ")
"\n "
(opm:artifact
((id "a2"))
"\n "
(opm:account ((ref "detailedAccount")))
"\n "
(opm:label ((value "cash")))
"\n ")
"\n "
I'm trying to look for all the opm:artifacts and the associated data (it's sublists).