is it a good idea to write a stored procedure for storing an XML in SQL?
i want to write a stored procedure in java for SQL to parse and store the xml automatically in the corresponding tables is it a good idea or any one guide开发者_Python百科 me how to do it.
thanx in advance
XML is a great way to store scratch data. MSSQL has awesome support for shredding/querying xml documents.
http://msdn.microsoft.com/en-us/library/ms345117(SQL.90).aspx
The xml?
Can you provide an example?
If you are trying to build xml, I think how I would do it is with a template engine such as one of these: (java template engines)
And load all the data you need from sql into that template file.
Or
If you are trying to parse XML I strongly recommend not doing so in sql. Use a xml parsing library to unpack that baby and then maybe a stored proc to put in a database.
To go backwards look at my solution above.
Xml is not an easy thing to parse or create. Jeff Atwood Agrees.
精彩评论