Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
14 replies
Subscribers
9 subscribers
Views
7907 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
XML Format
sridevik7401
Certified Lead Developer
over 8 years ago
Hi,
How to convert a CDT to an XML format excluding XML Header information.
To achieve this requirement I used toxml() function but it is including XML Header as shown below.
<n1:EmployeeDetails xmlns:n1="EmployeeDetails">
<firstName>xyz</firstName>
<lastName>abc</lastName>
</n1:EmployeeDetails>
But I want result as shown below.
<firstName>xyz</firstName>
<lastName>abc</lastName>
OriginalPostID-259969
Discussion posts and replies are publicly visible
0
normanc
over 8 years ago
Perhaps try using the substitute function?
substitute(
substitute(
ri!xmlText,
"<n1:EmployeeDetails xmlns:n1=""EmployeeDetails"">",
""
),
"</n1:EmployeeDetails>",
""
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandu
A Score Level 2
over 8 years ago
After having much fun with XpathSnippet finally got it
xpathsnippet(jsontoxml(a!tojson(ri!test),"Root","T"), "/Root/node()") this will give without root node
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
Great! This is a common requirement , good that you have found a solution using xpathsnippet
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sridevik7401
Certified Lead Developer
over 8 years ago
@chandrasekharg... thanks for your solution,i will try as you suggested.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<