Hi all,
I need to send simple nested XML to a vendor, but am getting the following error:
INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
I am loading the POST call in my Invoice Page Template using MVT as follows:
With multiple items, I am expecting it to send XML like this:
<post>
<orderaddr>
555 My Address
</orderaddr>
<orderemail>
[email protected]
</orderemail>
<item>
<ordercode>
RSC1
</ordercode>
</item>
<item>
<ordercode>
RSC2
</ordercode>
</item>
</post>
Please assist, I have hit a wall.
K.
I need to send simple nested XML to a vendor, but am getting the following error:
INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
I am loading the POST call in my Invoice Page Template using MVT as follows:
HTML Code:
<mvt:assign name="l.xml" value="'<?xml version=\"1.0\" encoding=\"utf-8\"?>' $ asciichar(10)" /> <mvt:assign name="l.xml" value="l.xml $ '<OrderID>' $ l.settings:order:id $ '</OrderID>' $ asciichar(10) "/> <mvt:foreach iterator="item" array="order:groups"> <mvt:assign name="l.xml" value="l.xml $ '<Item>' $ asciichar(10) "/> <mvt:assign name="l.xml" value="l.xml $ '<ItemID>' $ l.settings:item:code $ '</ItemID>' $ asciichar(10) "/> <mvt:assign name="l.xml" value="l.xml $ '</Item>' $ asciichar(10) "/> </mvt:foreach> <mvt:call action="'http://myvendorsapi.net/orders'" method="'POST'" fields="XML"> <mvt:eval expr="s.callvalue" /> </mvt:call>
<post>
<orderaddr>
555 My Address
</orderaddr>
<orderemail>
[email protected]
</orderemail>
<item>
<ordercode>
RSC1
</ordercode>
</item>
<item>
<ordercode>
RSC2
</ordercode>
</item>
</post>
Please assist, I have hit a wall.
K.
Comment