on 02-24-2017 9:37 AM
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?
I solved this problem by using Additional Parameter resultOptions with its value renderPreviousTags while doing the query through SFSF channel .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Piyush!
I guess links are broken. Please reload.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.