Skip to Content
Author's profile photo Alessandro Guarneri

Get rid of Recordset node

If you perform content conversion using the Adapter Module localejbs/AF_Modules/MessageTransformBean (as explained in the “How To Use the Content Conversion Module in JMS Adapter” HowToGuide), especially when going from structured (multi record) flat to XML, you may need an “ignoreRecordsetName” option…

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Marilyn Pratt
      Marilyn Pratt
      Good to see you back to blogging.
      Wonder if you'd care to look at the FAQ's for XI and lend your voice?
      Here is the: new Wiki 1.0
      There's a section on adapters just waiting to be filled.
      Marilyn
      Author's profile photo Alessandro Guarneri
      Alessandro Guarneri
      Blog Post Author
      Hi Marilyn,
      thanks for your words. I'll check out Wiki soon.

      Take care,
      Alex

      Author's profile photo Former Member
      Former Member
      Hi Alessandro,

      I don't see any difference between the two XML that was shown here. I guess may be copy-paste error 🙂

      I am still wondering is there any great value addition because of using this java mapping.
      Generally everyone used to go for ignoreRecordsetName
      OR
      create our strucutre with Recordset
      OR
      we can always give the Recordset Name in the content conversion paramter if out strucutre demands to have a different name.

      Even if we are not in the situation to use any of these option I feel the same can be achieved with few lines of code using XSLT. Even from performance point of view the java mapping shown here uses DOM. May be Java mapping with String manipulation like replace/substring or SAX would be of better performance.

      Anyways this is just my view, keep posting more blogs 🙂

      Regards,
      Prakash

      Author's profile photo Alessandro Guarneri
      Alessandro Guarneri
      Blog Post Author
      Thanks for your correction. Indeed a quick copy-paste did the mistake.

      Actaully the ignoreRecordsetName option was not workin' for me (SP16), and I had an already used DataType without recordset. That's why I wrote this java mapping.
      Also, I said explicitely that if anyone knew a std way, I would have been informed...

      Anyway, string manipulation doesn't fit (no wise guy would do that!)... Maybe SAX, but currently I don't know exactly how to deal with it.

      You know, I've never considered an XML a string.

      Author's profile photo Former Member
      Former Member

      Yes I do agree string manipulation would not be a great idea while dealing with XML, may be you can try with SAX. But I thought you would be happy with the string manipulation as you had already used string for processing instruction (I mean "xmldecl" in the above code) instead of ProcessingInstruction that is available in DOM. <br/><br/>Anyways here is the code in XSLT to do the same, thought this might help you <br/><br/><br/><?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <br/><xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:ns1="http://xi.com/test"><br/><xsl:output method="text/xml" version="1.0" encoding="ISO-8859-1" indent="yes"/><br/><xsl:template match="ns1:MyDocument/Recordset"><br/><ns:MyDocument xmlns:ns="http://xi.com/test"><br/><xsl:copy-of select="child::node()"/><br/></ns:MyDocument><br/></xsl:template><br/></xsl:stylesheet><br/><br/><br/>Regards,<br/>Prakash

      Author's profile photo Alessandro Guarneri
      Alessandro Guarneri
      Blog Post Author
      Thanks for your punctual comments and the XSL code.
      I will go for studying DOM the better way.