Method Community

 

Can I parse XML directly within Method (without using the API to import)?

Last post 09-29-2012 8:08 AM by Method_Paul. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-30-2012 12:59 PM

    Can I parse XML directly within Method (without using the API to import)?

    Being a newb I would appreciate any corrections if I'm fundamentally misunderstanding concepts here Geeked

     

    I'm using a web service call to my online shopping cart to return a list of records in XML format. Using the Method Web Service action, I can store that mass of XML text as an Action Result... but then what? Is there a way to translate that XML data into records for my Method tables using Method actions?

    I imagine the alternative would be to modify my service call to return one record at a time, or even one field at a time, and use character functions to remove the XML code around the data before sticking them into tables. I also imagine that being a very painful and unpragmatic solution. 

    Is Method perchance clever enough to interpret the entire list of records, and map it to a Method table of my choosing?

     

    PS: what I'm really hoping is that there is a solution that doesn't involve creating a third party app that would make the web service call, then use the Method API to insert the data into Method. 

     

  • 06-01-2012 9:14 AM In reply to

    Re: Can I parse XML directly within Method (without using the API to import)?

    Answer

    smohyee:
    Is Method perchance clever enough to interpret the entire list of records, and map it to a Method table of my choosing?

    Not at this time - there are no Actions to process XML and trying to use the character function to do this would be difficult.  Your solution should be a web service before Method to process/parse the XML.

  • 09-29-2012 8:08 AM In reply to

    Re: Can I parse XML directly within Method (without using the API to import)?

    FYI  to those watching this thread.

    The October 2012 version will have a "Get node value from XML", under the Character Function action, that will allow you an easy way to parse values from known XML nodes.

    Paul

Page 1 of 1 (3 items)