Read an XML Data type of workbench process through Java

Avatar

Avatar
Validate 10
Level 3
sobhan_sahu
Level 3

Likes

4 likes

Total Posts

82 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
sobhan_sahu
Level 3

Likes

4 likes

Total Posts

82 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
sobhan_sahu
Level 3

03-11-2017

Hi All,

I have an workbench process which has an output parameter as a XML as data type.

How can I read it through my java code and convert it into string.

Any help please.

Thanks,
Sobhan

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 3
lesutton1
Level 3

Likes

9 likes

Total Posts

47 posts

Correct reply

14 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile

Avatar
Boost 5
Level 3
lesutton1
Level 3

Likes

9 likes

Total Posts

47 posts

Correct reply

14 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile
lesutton1
Level 3

03-11-2017

There's really nothing complex to do here. In your process, update your string variable with the xml variable and the conversion will happen for you automatically. Don't use java to do this.

Answers (1)

Answers (1)

Avatar

Avatar
Validate 10
Level 4
mjb54261515
Level 4

Likes

33 likes

Total Posts

132 posts

Correct reply

32 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 10
Level 4
mjb54261515
Level 4

Likes

33 likes

Total Posts

132 posts

Correct reply

32 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile
mjb54261515
Level 4

03-11-2017

There are muliple ways to handle xml reponse one of the ways is parsing xml InputStream using DocumentBuilderFactory

here is one good resource:

java - HTTP request for XML file - Stack Overflow

How to read XML response from a URL in java? - Stack Overflow