vukers Posted January 11, 2006 Share Posted January 11, 2006 Hi guys,I'm new to XML programming, and I was wondering what the quickest way to make the following program would be:If I had a XML file that had around 20 items: <newsML> <item> <text>Good morning</text> <id>42567</id> </item> <item> <text>Good evening</text> <id>52567</id> </item>...</newsML> and I wanted to split each <item> into individual XML files, what would be the best way to approach this? Thanks a lot! Link to comment Share on other sites More sharing options...
sancho Posted January 11, 2006 Share Posted January 11, 2006 Hi guys,I'm new to XML programming, and I was wondering what the quickest way to make the following program would be:If I had a XML file that had around 20 items:<newsML> <item> <text>Good morning</text> <id>42567</id> </item> <item> <text>Good evening</text> <id>52567</id> </item>...</newsML> and I wanted to split each <item> into individual XML files, what would be the best way to approach this? Thanks a lot! <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
sancho Posted January 11, 2006 Share Posted January 11, 2006 Oops sorry That wasn't exactly what i meantYou can "talk" with other XML files by using xlink. Unfortunatly I still haven't figured out how that should be done. Ill let you know when i do Link to comment Share on other sites More sharing options...
vukers Posted January 11, 2006 Author Share Posted January 11, 2006 Cool! I'll read more into that.I was thinking there must be a way to loop through each item and just output directly to another file.Perhaps not the best way to do it. =] Link to comment Share on other sites More sharing options...
Skemcin Posted January 11, 2006 Share Posted January 11, 2006 I'm not too familiar with xlink, but this sort of task could be accomplished using a server side scripting language like cold fusion - for one. What would you use for the filname - the value of the <id> tag? Link to comment Share on other sites More sharing options...
vukers Posted January 11, 2006 Author Share Posted January 11, 2006 exactly... we would name each item according to the id tag.however, it doesn't need to be server side.Ideally, I would download the complete xml file to my computer, and then run a program that splits it into individual xml files in the same folder.That should actually be simpler.. what do you guys think? Link to comment Share on other sites More sharing options...
~Shinta Posted January 27, 2006 Share Posted January 27, 2006 Use server side. It's the only way I know you can do it. Link to comment Share on other sites More sharing options...
Dale Posted February 17, 2006 Share Posted February 17, 2006 I dont really use XML but try http://www.w3schools.com/xml/default.asp for more info on XML 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