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

Extract XHTML Parts of a XML-File

Dear Experts,

We have a request to extend an existing Adobe Interactive Form to give the user the possibility to enter formatted text (Rich-Text). The problem is, that only the form should store the formatting. During the inbound processing the text-formatting should be removed and only plain text (with line-breaks) should be stored in SAP-System.

For that, I have changed the attributes of the text field from Plain-Text to Rich-Text.

Now I have seen that the made input will be stored as XHTML-Part within the XML-Document.

Here a short example:

<CONC_LINES>

<Body xmlns: XFA = "http://www.xfa.org/schema/xfa-data/1.0/" xmlns = "http://www.w3.org/1999/xhtml" xfa: APIVERSION = "Acroform: 2.7.0.0 "xfa: spec =" 2.1 ">

<P dir = "ltr" style = "font-family: Helvetica; text-decoration: none"> Test with note

<Span style = "XFA spacerun: yes"> a </ span>

<Span style = "vertical-align: -1.5pt; font-size: 6.6pt"> Formatting </ span>

</ P>

<P dir = "ltr" style = "font-family: Helvetica; font-weight: bold; text-decoration: none"> Test note

<Span style = "font-weight: normal"> with

<Span style = "XFA spacerun: yes"> a </ span>

</ Span>

</ P>

.

.

.

</ Body>

</ CONC_LINES>

Until now, the entire XML document during inbound processing was transformed to ABAP using the Function CALL TRANSFORMATION.

After changing the settings to Rich-Text, the transformation cancels with an exception (transformation error).

Now my idea was to extract the XHTML part and process it separately. I've tried to do this with the XML Parser of the iXML classes.

My expectation was, that the parser would return the part between the <CONC_LINES> tags, but the parser removes all information (including the line breaks) and only the plain text will be shown.

Is there any way to receive the complete information between the tags?

Thank you and best regards

Stefan

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 27, 2016 at 01:12 PM

    Hi Steve,

    did you find any answer on this so far?

    I like the idea of extracting the XHTML part because this seems to create dumps in the ABAP Offline Infrastructure as well.

    Thanks and Kind Regards,

    Lukas

    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.