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
6 replies
Subscribers
8 subscribers
Views
5561 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
How can we read the content of an XML File
senthilr143
over 8 years ago
I have an XML file. I want to read the whole XML file into a text field. Then do some manipulation asn then create a new XML file using the updated text.
Note:
The XML file can vary in structure.
Please let me know how can we achieve this via APPIAN
OriginalPostID-233411
Discussion posts and replies are publicly visible
0
pavithrac
over 8 years ago
Hi Senthilr143, did you had a try to use the Appian Scripting Function xpathsnippet() which can do your job. Please refer the lin
forum.appian.com/.../Scripting_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sparshs
over 8 years ago
you can use xpathsnippet() and if the xml is complex you can create a custom smart service to read this.Let us know if you need some other information on this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
senthilr143
over 8 years ago
To use xpathsnippet we need to know the structure of the XML. But the XML which will get loaded are dynamic. We will not have any idea on the structure of the XML. User may upload any and I will read the content of the file into a text and then replace certain keyword with some value.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sparshs
over 8 years ago
so just use it as a string . You can use function to read the whole document and get the whole content as a string value.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
senthilr143
over 8 years ago
Yes,. Can you please help me to know what is that function?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
subramanian Valliappan
Certified Lead Developer
over 8 years ago
Hi Senthilr you can use the function readTextFromFile which is available in shared components to read the contents of a file as a string value.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel