Splitting XML file using Grep / Sed / Awk?

111111q

New Member
Trying to figure out the best way (either by using what I know in Grep / Sed / Awk) to split up an XML file based on it's individual string (key?). I have an XML file that is a SQL dump of all my current FAQ entries so it contains an entry ID and then a rather large HTML formatted document. I'm looking to split these entries up so I can easily pop them into an editor and clean up the formatting to import to a new KB / FAQ system. Here's an example of my data:\[code\] <article id="3"> <language>en</language> <category>Category Name</category> <keywords>Keywords, by, comma</keywords> <question>Question?</question> <answer>HTML Formatting</answer> <author>Author</author> <data>2010-05-13 09:32</data> </article>\[/code\]The XML file contains every single KB article I have back to back in this format. I am comfortable with bash to figure it out, I just don't know how to split it into multiple files based on the search.Cheers,Clay
 
Back
Top