cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Mixed Content XML in SAP PO 7.5

Former Member
0 Kudos

Hi All ,

In one of the requirement ,in integration with success factors employee central ,using SAP PO 7.5, I am facing issue with mixed content in my xsd ,It is like i am getting data as shown in highlighted text.

This is the XML mixed content which is not getting handled by the PO System.

I am not getting the values of the node which includes mixed content as shown

Here the value "test6" is not getting populated in the field "middle_name".

How can we handle this in PO 7.5?

former_member190293
Active Contributor
0 Kudos

Hi Piyush!

How should your output structure look like?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

I solved this problem by using Additional Parameter resultOptions with its value renderPreviousTags while doing the query through SFSF channel .

Answers (3)

Answers (3)

former_member190293
Active Contributor

Hi Piyush!

For this test input:

<?xml version="1.0" encoding="UTF-8"?>
<MT_RootNode>
    <Element1>
        <SubElement1>Value1</SubElement1>
    </Element1>
    <Element2>Value2<SubElement2>Value3</SubElement2>
    </Element2>
</MT_RootNode>

given XSLT transformation:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output indent="yes"/>
    <xsl:template match="/">
        <xsl:apply-templates/>    
    </xsl:template> 
    <xsl:template match="Element2">
        <xsl:element name="{name()}">
            <xsl:attribute name="value"><xsl:value-of select="text()"/></xsl:attribute>
            <xsl:apply-templates select="./*"/>
        </xsl:element>
    </xsl:template>
    <xsl:template match='@*|node()'>
        <xsl:copy>
            <xsl:apply-templates select='@*|node()'/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>

produces desired result which is acceptable in PI:

<?xml version="1.0" encoding="utf-8"?>
<MT_RootNode>
   <Element1>
      <SubElement1>Value1</SubElement1>
   </Element1>
   <Element2 value="Value2">
      <SubElement2>Value3</SubElement2>
   </Element2>
</MT_RootNode>

Regards, Evgeniy.

former_member190293
Active Contributor
0 Kudos

Hi Piyush!

Generally speaking, mixed type elements are not prohibited in XML. What is your requirement? What is your requirement for target structure?

You can use XSLT for moving previous value to attribute instead of subelement, for example.

Regards, Evgeniy.

Former Member
0 Kudos

Thanks Evgeniy.

Can we achieve this using graphical mapping in SAP PO if you are aware of PO.We have 100 nodes to deal with,will it be feasible to use XSLT mapping?

And how can we do this using XSLT?

Regards

Piyush

former_member190293
Active Contributor
0 Kudos

Hi Piyush!

I guess links are broken. Please reload.

Regards, Evgeniy.

Former Member
0 Kudos

Hi Evgeniy,

Please look into it now.

Regards

Piyush