2 Replies Latest reply: Mar 27, 2013 8:30 PM by vladodias RSS

    OSB  - Transformation from HTML

    998528
      I realize the transformations of every response different from the service of web, by means of the eclipse.
      And one of them is special, because he returns a HTML structure. I put an example of response:

      <HTML>
      <HEAD>
      <TITLE>Error 401--Unauthorized</TITLE>
      <META NAME="GENERATOR" CONTENT="WebLogic Server">
      </HEAD>
      <BODY></BODY>
      </HTML>


      Since it would be done in this case?
      I am interested in obtaining the text of the label TITLE and in guarding it in another structure of final response of the web service.
        • 1. Re: OSB  - Transformation from HTML
          Abhinav
          If your response is inside $body then to get text of Title element,
          use $body/HEAD/TITLE/text()
          in guarding it in another structure of final response of the web service
          I could not understand, but if you want a root element for response, then you can have
          <root_element>
          {$body/HEAD/TITLE/text()}
          </root_element>

          Regards,
          Abhinav
          • 2. Re: OSB  - Transformation from HTML
            vladodias
            You can not use transformations for non well-formed xml documents...

            Document you've posted is not a well-formed xml document (META tag opened without closing)

            So, the option for you will be string manipulation functions...

            Cheers,
            Vlad