Skip to Content
author's profile photo Former Member
Former Member

HTML-->XML mapping.

Hi,experts

scenerio:

HTTP client<==>XI<==>non SAP system

This is a synchronous scenerio.the backend system receives HTTP request and returns response document with a form of HTML.So, in XI response mapping ,Do i need to transform the content type HTML into XML?and how should i do this?i have no experience about this,as far as i know,transforming XML into HTML needs a java mapping.what about HTML->XML?

please help .thanks.

Brand.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 04:04 AM

    Hi Brand,

    To convert between HTML and XML, XSLT mapping is the best way.

    If you need info on XSLT, please refer [this link|http://www.w3schools.com/xsl/default.asp].

    Regards,

    Riyaz

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 04:54 AM

    Hi,

    if it is complex structure go for XSLT or u can use xslt(abap) it is bit faster.

    use XSLT_TOOL

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 05:39 AM

    Hi

    It depends on what you want to do with the HTML.

    But you can achieve the same using XSLT.

    Here is a sample HTML very basic one...

    <HTML>
    <BODY>
    <P align="center">
    ABCD
    </P> 
    </BODY> 
    </HTML>

    Here is the XSLT which copies the XSLT as it is

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="*">
      <xsl:copy-of select="@*"/>
      <xsl:apply-templates/>
    </xsl:template>
    </xsl:stylesheet>

    BR

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 06:07 AM

    Hi all

    Thank you for replying.

    But,as far as i know,the XSLT uses xpath to access XML,

    so it can transform XML=>HTML,but can not transform HTML=>XML.Is it a misunderstanding?

    Brand.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      > But,as far as i know,the XSLT uses xpath to access XML,

      > so it can transform XML=>HTML,but can not transform HTML=>XML.Is it a misunderstanding?

      Brand

      I gave you a working example of converting HTML to XML in my earlier reply.....

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 06:08 AM

    better use Message Mapping... tat is good enough

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.