Best Approach/Practice to Display an XML response to Web Screen?

Hi guys, just a basic question.

What would be the best approach to display my successful XML response to my web screen? Since I can't display it "as is", I'd be  needing to parse the data and display only those I need.

Do I convert it to JSON first, then use an OS component to parse the data?

Do I convert it to JSON then use an JSONtoRecordList function?

 Or, directly parse the XML response using Javascript ?

There are a couple of XML components in the Forge, you should be able to use one of those to directly convert your XML to a record list

For example https://www.outsystems.com/forge/component-overview/153/xml-records


John Williams wrote:

There are a couple of XML components in the Forge, you should be able to use one of those to directly convert your XML to a record list

For example https://www.outsystems.com/forge/component-overview/153/xml-records


I'm using Serialization_XmlToRecordList but it's either buggy or I don't know how to use it. 

https://www.outsystems.com/forums/discussion/43544/object-reference-not-set-to-an-instance-of-an-object-xmltorecordlist-error/#Post157210

There are no errors during compile time. But on RUNTIME I get this error:
"Object reference not set to an instance of an object"

What I'm trying to do is to be able to assign each  XML data response to a Record List or Outsystems variable so I can use it as I please.

For example, I get 200 lines of XML data response. But I only want to use the "first name", so I'm looking for a way to get only the "first name" and display it on the screen.

Hi,


I am not sure what you want exactly, but easiest way is to put it in a textarea.

--> http://jsfiddle.net/y9fqf/1/

otherwise use xslt for it.


J. wrote:

Hi,


I am not sure what you want exactly, but easiest way is to put it in a textarea.

--> http://jsfiddle.net/y9fqf/1/

otherwise use xslt for it.


Thank you for the willingness to help. I have updated my question. I hope it adds clarity. Thanks!