MySQL Forums
Forum List  »  Newbie

XML parsing in mysql
Posted by: Rakesh Raman
Date: January 29, 2014 05:18AM

Hi,

I am developing a stored procedure in mysql and the input to the stored procedure will be an XML. Sample XML format is

<XMLPost><TakeAction value="FETCHDATA"><ProcessName value="new_process"><fieldName value="aaa">1</fieldName><fieldName value="bbb">2</fieldName></ProcessName></TakeAction></XMLPost>

I want an XML parser sample code to parse the above XML format. Please note that the nodes <fieldName value="aaa">1</fieldName><fieldName value="bbb">2</fieldName> can be multiple and can be 1 or 2 or 4 or n it cannot be identified. Say for the next XML it can be


<XMLPost><TakeAction value="FETCHDATA"><ProcessName value="next_process"><fieldName value="ccc">1</fieldName><fieldName value="ddd">2</fieldName><fieldName value="efg">4</fieldName><fieldName value="eee">5</fieldName></ProcessName></TakeAction></XMLPost>

So the parser should be a dynamic one which will be parsing the above format. Please let me know with a sample code which handles this

Options: ReplyQuote


Subject
Written By
Posted
XML parsing in mysql
January 29, 2014 05:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.