on 04-23-2018 12:39 PM
Hello Experts,
I'm trying to append multiple proxy calls into a single XML file. A simple APPEND function in Communication channel repeats the XML header Tags (<?xml version="1.0" encoding="UTF-8"?>) and the XML is not well formed.
Removing the XML header using XSLT mapping and then appending the rest of the data again causes not well formed XML even when we check by manually adding the XML header(I can later add XML header after appending the file using XSLT).
Is there a known easier approach for handling multiple proxy calls into a single XML file in receiver? I have seen blogs which shows the possibility with flat file. The challenge is that the receiver file is in XML format.
Your inputs are appreciated.
PI version used: 7.11
"Removing the XML header using XSLT mapping and then appending the rest of the data again causes not well formed XML"
Are you saying the XML is well formed but you get an error saying it is not? Or is your XSLT producing not well formed XML?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After removing the XML header using XSLT mapping and viewing the appended data in XML viewer, I get a error stating "Extra content at the end of the document". My XML structure after appending and removing the header is something similar to the below structure.
<RootElement xmlns="http://www.sample.com/Sampledata">
<ChildElement>
<data>1234</data>
<name>Person</name>
</ChildElement>
</RootElement>
<RootElement xmlns="http://www.sample.com/Sampledata">
<ChildElement>
<data>1234</data>
<name>Person</name>
</ChildElement>
</RootElement>
<RootElement xmlns="http://www.sample.com/Sampledata">
<ChildElement>
<data>1234</data>
<name>Person</name>
</ChildElement>
</RootElement>
"Extra content at the end of the document"
Sounds like some erroneous characters at the end of the file. Try viewing the file in Microsoft Word with all formatting displayed:
File -> Options -> Display -> Show all formatting marks
It may give you a clue to what the extra content it is complaining about. If the XML "looks" valid why not ask your vendor if they can work with it?
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.