08-18-2005 8:03 PM
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"?>
<asx:abap version="1.0" xmlns:asx="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.
08-23-2005 8: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.
08-20-2005 9: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
08-23-2005 6:24 PM
08-23-2005 8: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.
08-24-2005 6:18 AM
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
08-24-2005 2:37 PM
08-24-2005 2:41 PM
Hi,
Good to hear that i was able to help you. and thanks for the points. yes i got them
Regards
Raja