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

Need help getting rid of those <ASX:ABAP> tags from the generated XML file!

I was able to transfer xml data from abap internal tables to a string.

Here is the content of the string:

-


<?xml version="1.0" encoding="iso-8859-1"?>

http://www.sap.com/abapxml">

<asx:values>

<DATA>

<item>

<UOM1 />

<UOM2>L</UOM2>

<GL_PR_SEG />

<RECORDMODE>A</RECORDMODE>

</item>

</DATA>

</asx:values>

</asx:abap>

-


Now my goal is to strip out a couple of tags out of that string directly using xslt.

Do you know of any way i could take out the <asx:abap> and <asx:values> tags using an xslt program. I'd like to be able to strip them out directly from the string itself.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2005 at 07:58 PM

    Aja, where do you suggest i find the function "replace all occurences of"? Is it from abap or xslt?

    Keep in mind that the xml code that I want to edit is in a string. Although it is possible to dump the code in a file and edit it, i don't have that option here!

    Are you suggesting that I use XSLT or ABAP to get rid of these <asx> tags? A couple of code fragments would help.

    Add a comment
    10|10000 characters needed characters exceeded

    • its not function. its within abap.

      within your abap program, the xml code is in a string for example xml_string .

      use

      replace all occurrences of '<ASX:ABAP>' in xml_string with '' .

      replace all occurrences of '</ASX:ABAP>' in xml_string with '' .

      replace all occurrences of '<ASX:VALUES>' in xml_string with '' .

      replace all occurrences of '</ASX:VALUES>' in xml_string with '' .

      Hope this solves your issue.

      If your question is answered, reward the helpful answers with points and close the thread.

      Regards

      Raja

  • Posted on Aug 20, 2005 at 08:45 AM

    Hi,

    its the XML namespace, go thru the following link to understand about namespace.

    http://www.rpbourret.com/xml/NamespacesFAQ.htm#q1_1

    if you really want to remove it,(understanding the implications) you can just use

    <b>replace all occurrences of</b> to replace the unwanted text to space.

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2005 at 01:37 PM

    Thanks Raja!!

    Let me know if the points have been rewarded!!!

    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.