This topic contains 4 replies, has 1 voice, and was last updated by chanarbon 8 years ago.

  • Author
    Posts
  • #6028

    darrenhillconsulting

    Is there anyway that I can format an XML string server-side. Currently, I’m POSTING the unformatted XML to

    http://www.freeformatter.com/xml-formatter.html But I’d rather not do that.
    This is a cached copy. Click here to see the original post.

  • #6029

    david.smith

    Is this for display of the XML client side?

  • #6030

    david.smith
  • #6031

    darrenhillconsulting

    David,

    No, its not for client-side. Its for an old PeopleSoft integration that requires the XML to be 2-character indented. Can you a imagine? A system that needs its xml visually appealing? At this point, I won’t argue.

    *NOTE: I didn’t believe them when they first said the xml needed to be formatted, so I sent them a ‘regular’ xml. Sure enough, it error’d out indicating it was expecting characters at a certain position. LOL!

    BTW, that vkbeautify did the trick. Thanks!

  • #6032

    chanarbon

    How about this one, https://github.com/google/code-prettify

    I tried doing nlapiStringToXML() to convert the XML string to XML data then convert it back to string using nlapiXMLToString() to see whether it formats properly but ended up back to the same XML string without n and t

You must be logged in to reply to this topic.