View Single Post
Old 09-09-2012, 01:36 PM   PM User | #1
metcala
New to the CF scene

 
Join Date: Sep 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
metcala is an unknown quantity at this point
XML attributes advice

Hey guys,

I was wondering if anyone could give me a little bit of advice. I'm working on a project in which a user will enter details in a form and based on a couple of parameters a schedule will be returned. I was planning on using an XML document to store various schedules and using javascript to return the appropriate plan. I just wanted to know if this is a logical way to approach this?

I've put a really quick example of the different elements I'm thinking. So for example the user would select Biology at level 1 in the initial form and a revision plan would be returned. Going forward I want to keep it flexible in how it can be returned so for example within week 1 the days can be swapped around (so people can sort their revision plan to suit themselves).

Code:
<?xml version="1.0" encoding="utf-8"?>
<plan>
	<subject category="Biology">	
		<study level="1">
			<week number="1">
				<day number="1">
					<session_description>Topic 1</session_description>
				</day>
			</week>
		</study>
	</subject>
</plan>
I'd be grateful if you could let me know what you think! Thanks guys, I really appreciate it!
metcala is offline   Reply With Quote