1

When I run svn log --xml 'repos' . It generates the log like...

<logentry revision="1">
<author>harry</author>
<date>2008-06-03T06:35:53.048870Z</date>
<msg>Initial Import.</msg>
</logentry>

Can it be outputed as

<logentry>
<revision>1</revision>
<author>harry</author>
<date>2008-06-03T06:35:53.048870Z</date>
<msg>Initial Import.</msg>
</logentry>

This will help me parse it easily to insert the data into the database. Or is there any easy way to store the log to a database.

1
  • 1
    Why is reading an attribute a problem? I don't think I've ever seen a XML library where reading attribute would be more difficult than reading node value. Commented Feb 28, 2013 at 13:08

2 Answers 2

5

Without compiling your own custom Subversion client with the modifications you're after, you can't.

Alternatively, you could pass the XML through an XSLT stylesheet to perform the transform(s) you're after, and then feed that into your database.

Or simply parse the XML yourself (every programming/scripting language has an XML library built in, or easily obtained) to perform the inserts.

Sign up to request clarification or add additional context in comments.

Comments

1

PanBI has a svn module which gives an OLAP interface to svn log: http://sourceforge.net/projects/panbi/

It generates a svn.sql with all your log. You can use the sql to dump in to any db you want

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.