on 02-11-2013 2:26 PM
Hi Friends,
I have to send a XML file to receiver without indent.
<Message>
<Header>
<Sender>SSDRTWRQ</Sender>
<Receiver>RSGSFDHDJ</Receiver>
<MessageType>PRMSG</MessageType>
<MessageDescription>MSGR - 000001</MessageDescription>
<TimeStamp>2013-02-06T13:21:05</TimeStamp>
</Header>
<Body>
<PayrollMessage>
<PayrollMessageRef>MSGR - 000001</PayrollMessageRef>
<PayrollMessageType>MT100 - Payroll</PayrollMessageType>
<PayrollTransactionCount>0000094</PayrollTransactionCount>
<PayrollTransactionAmount>718606.4</PayrollTransactionAmount>
</PayrollMessage>
</Body>
</Message>
instead of actual structure given below
<Message>
<Header>
<Sender>SSDRTWRQ</Sender>
<Receiver>RSGSFDHDJ</Receiver>
<MessageType>PRMSG</MessageType>
<MessageDescription>MSGR - 000001</MessageDescription>
<TimeStamp>2013-02-06T13:21:05</TimeStamp>
</Header>
<Body>
<PayrollMessage>
<PayrollMessageRef>MSGR - 000001</PayrollMessageRef>
<PayrollMessageType>MT100 - Payroll</PayrollMessageType>
<PayrollTransactionCount>0000094</PayrollTransactionCount>
<PayrollTransactionAmount>718606.4</PayrollTransactionAmount>
</PayrollMessage>
</Body>
</Message>
I even used below statement in XSLT mapping but didn't get result.
<xsl:output method="xml" indent="no"/> |
Can anybody guide me, if he has any such experience? Can i use XSLT mapping to achieve this.
Thanks.
Sumeet.
Hi,
You can go for java mapping or XSLT mapping. check below blog for java mapping it might help you.
for xslt did you try like that:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Regards
Gagan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Also you can try with these two sentences:
<xsl:output method="xml" encoding="UTF-8" indent="no" />
<xsl:strip-space elements="*"/>
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumeet,
Check with:
<xsl:output indent="no" />
accompanied by
<xsl:template match="text(normalize-space()='')" />
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
Have you tried with UTF encoding
<xsl:output method="xml" encoding="UTF-8" indent="no" />
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.