Making mySQL XML Exports Friendlier to OpenInsight – Part 1
Last Updated on Wednesday, 30 December 2009 10:13 Written by admin Wednesday, 30 December 2009 09:58
If you have ever utlized the mySQL Query Browser and exported a resultset to XML, you may have notice the format that the XML file is in. See the example below:
If you have ever tried to import XML like this into OI without a schema (which isn't easily provided), then you know there is some formatting that needs to be done to the XML. I personally love using the OI function Get_XML_Value(). However, that function ceases to work with this formatting.
So, to get around this, I whipped up a quick down and dirty piece of code that formats the XML into a more OI friendly format. Now I realize there are always other ways of doing this, so — this is just another way. Comments are always welcome on better ways too!
You will also need the following code for the Get_Last_Value subroutine. This subroutine returns the last position in a delimited string, just another routine to use instead of the Count Function.
You will need to change the values for the variables — File and Tags. So that is how you can format your XML for easy import into OI. Next in the series will be the code to import this formatted XML file into OpenInsight.
- Share this on Facebook
- Share this on Linkedin
- Share this on Tumblr
- Blog this on Blogger
- Share this on Tipd
- Share this on del.icio.us
- Share this on Blinklist
- Digg this!
- Post this on Diigo
- Share this on Reddit
- Buzz up!
- Stumble upon something good? Share it on StumbleUpon
- Share this on Technorati
- Share this on Mixx
- Post this to MySpace
- Submit this to DesignFloat
- Tweet This!
- Email this to a friend?
- Suggest this article to ToMuse
- Subscribe to the comments for this post?
- Seed this on Newsvine
- Share this on Devmarks
- Add this to Google Bookmarks
- Add this to Mister Wong
- Add this to Izeby
- Share this on PFBuzz
- Mark this on BlogMarks
- Submit this to Twittley
- Share this on Fwisp
- Moo this on DesignMoo!
- Share this on BobrDobr
- Add this to Yandex.Bookmarks
- Add this to Memory.ru
- Add this to 100 bookmarks
- Add this to MyPlace
- Submit this to Hacker News
- Send this page to Print Friendly
- Bump this on DesignBump
- Add this to Ning
- Post this to Identica
- Save this to Xerpi
- Share this on Wikio
- Tip this to TechMeme
- Sphinn this on Sphinn
- Post this to Posterous
- Grind this! on Global Grind
- Ping this on Ping.fm
- Submit this to NUjij
- Submit this to eKudos
- Submit this to Netvouz
- Submit this to Netvibes
- Share this on Fleck
- Share this on Blogosphere News
- Blend this!
- Add this to Wykop!
- Engage with this article!
- Share this on Hyves
- Push this on Pusha
- Bookmarks this on Hatena Bookmarks
- Store this link on MyLinkVault
- Submit this to SlashDot
- Add to a lense on Squidoo
- Submit this story to Propeller
- Submit this to FAQpal
- Clip this to Evernote
- Submit this to Meneame
- Submit this to Bitacoras
- Submit this link to JumpTags
- Share this on Bebo
- Submit tip to N4G
- Submit this to Strands
- Promote this on Orkut
- Add this to Stumpedia
- Post this to Current
- Share this on Plurk