Hello,
I am implementing a logic where I would want to store all the elements of a document or xmlString into HasMap. The key to the hashmap is the xpath of the variable and the value to the hashmap would be the actual value of the variable. For Example, suppose I have an XML of the below form:
<?xml version="1.0"?>
<header>
<H1> h1</H1>
<H2> h2</H2>
<H3> h3</H3>
<body>
<B1> B1</B1>
<B2> B2</B2>
<body1>
<B3> B3 </B3>
<B4> B4 </B4>
<body2>
<B5> B5 </B5>
</body2>
<body2>
<B6> B6 </B6>
</body2>
</body1 >
</body>
</header>
My Hashmap should look like
Key Value
header.H1 H1
header.H2 H2
header.H3 H3
header.body.B1 B1
header.body.B2 B2
header.body.body1.B3 B3
header.body.body1.B4 B4
header.body.body1.body2[0].B5 B5
header.body.body1.body2[1].B6 B6
If there are multiple instances, as in document list or string list, the instance of that list should be available in the hashmap. Please could anyone guide me how we can achieve this using webMethods flow service or a java service.
Many thanks in Advance.
âR Chikkanna