step through xml do something specific at a tag

Szary

New Member
Can someone point me to a tutorial on this? i've looked at some similar questions on Stackoverflow and looked at PHP DOM in the manual.I have an XML document and at two particular tags want to output data from my database, otherwise still output the other tags and the info within them.So I want to grab the info in a query to automatically insert the home and away line-ups dynamically.\[code\]<root> <sometag>Some text here</sometag> <anothertag>Something else here</anothertag> <Hometeam>Cardinals</Hometeam> <HomeLineup></HomeLineup> -- this would be database driven data <Awayteam>Giants</Awayteam> <AwayLineup></AwayLineup> -- this would be database driven data <yetmoretags>Other stuff</yetmoretags></root>\[/code\]I see an example here that would create an xml file:Using PHP DOM to create XML files from MySQL databut a) I'm not sure how I would ensure the other xml tags and content would get spit outand b) not sure how I would load those file/files or at what point they would be outputted.Really I'm making a full page with some other content, php and javascript related and am not sure the best method to output the database content within the specific DOM tags.I've looked at the PHP DOM docs and understand how to manipulate and find a specific tag but don't know how to output the entire document but specifically within that document include dynamic content.
 
Back
Top