Skip to main content

Notifications

Microsoft Dynamics RMS (Archived)

XML PO document changes

Posted on by Microsoft Employee

How do I make changes to the PO XML format used by RMS system. I need to create XML purchase orders to be exported from RMS and sent to a vendor for translation in a traditional EDI/XML order processing application?

I want to add additional data elements to the default order format.  Where is the XML schema located?

I also think that I need to change the xml encoding statement from UTF-16  to UTF-8.  

<?xml version="1.0" encoding="UTF-16"?>

The exported XML order document cannot be translated by our vendor due to invalid characters (x'FF' and x'FE') that precede the beginning of the xml document. 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: XML PO document changes

    The definition for the PO files is in the POFormats folder in your RMS install folder.

    The standard PO output format is defined in RMSPurchaseorder.xsl. XSL files provide stylesheets for creation of XML documents. If you are using a custom PO format, the file should still be in that folder, but may have a different name. The xsl file defines what the resultant xml file will contain.

    What I would try is to add the following parameter to the xsl:output statement near the beginning of the file:

    encoding="windows-1252"

    "windows-1252" is a superset of the "ISO-8859-1" character set, which you could also try. Both use a simple 8-bit encoding of the Latin alphabet (kinda like ASCII, but with some additional characters defined). UTF-8 is a variable length encoding where most of the usual ACSII characters are encoded using 1 byte, while less common characters in the Unicode character set are encoded using 2, 3 or even 4 bytes per character.

    You may even want to try 'encoding="UTF-8"'. Your vendor may support that.

    All of the parameters tell the xsl parser what format the output file should be in. The default RMS PO file does not specify an encoding, so RMS is using a default from somewhere.

    XSL is not specific to RMS. It is a standard just like XML, so Google is your friend here.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: XML PO document changes

    Thanks FuncTech... Great info on the UTF-16 hex characters preceding the xml BOM.

    Next question is: how do I change the RMS PO export process to use the UTF-8 encoding data stream?  Where in RMS system is the XML PO format/schema used by the PO export function?  

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: XML PO document changes

    The fe ff characters are at the beginning of the data stream and are called byte order marks. These are sent at the beginning of the UTF-16 stream in this case to indicate the endianness of the following data stream. That is: for a 16 bit value is the high order or low order byte sent first? UTF-8 will often start the stream with EF BB BF to indicate that this is a UTF-8 data stream.

    The various Unicode BOM markers are:

    First bytesEncoding assumed
    EF BB BF UTF-8
    FE FF UTF-16 (big-endian)
    FF FE UTF-16 (little-endian)
    00 00 FE FF UTF-32 (big-endian)
    FF FE 00 00 UTF-32 (little-endian)
    None of the above UTF-8

    The XML standard specifies that all XML data streams should be encoded in a Unicode character set and support BOM characters at the beginning of the stream. the standard also states that all XML parsers should support BOM's and various Unicode character sets. So the problem is actually with your vendor's system. But that is of no help to you since they probably don't want to change.

    Can you set the encoding to ASCII? That is not officially supported by XML, but may be what your vendor is looking for. It would also mean that you cannot send characters outside of the ASCII character set.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans