hamza Posted July 3, 2006 Share Posted July 3, 2006 HelloNew to xml and needing some help.I donot understand the below code completely .<html><body><xml id="cdcat" src="cd_catalog.xml"></xml><table border="1" datasrc="#cdcat"><tr><td><span datafld="ARTIST"></span></td><td><span datafld="TITLE"></span></td></tr></table></body></html>My questions are given below:1) What is meant by span and datafld .2) Why we use # with datasrc name "cdcat".Waiting ur's reply Hamza Khalid Link to comment Share on other sites More sharing options...
scott100 Posted July 3, 2006 Share Posted July 3, 2006 My questions are given below:1) What is meant by span and datafld .2) Why we use # with datasrc name "cdcat".1) span is a container for the results, in order to bind this data to HTML elements, you must specify the DATASRC and DATAFLD attributes on those elements.2) The "#" preceding the XML data island ID in the DATASRC attribute must be present in order to bind the data. The hash (#) sign usually means get the element by it's id so there should be an element on the page with id="cdcat" - which there is. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now