2005 Mar 15 2:17 PM
Hello sdn
I have a problem. I have an xml file and i want to get data from this file into an abap field (using xslt). I have tried the sxsltdemo1 and made my own version of this program. This works fine, but my realworld xml file contains some xml-schemas. This creates the problem i think. I'm not able to get data from the xml file using xslt (which is how i nedd to do it). Is there any documentation how to extract data from an xml which contains schemas.
The problem is that i need to get an xml-field which is encoded in base64 into a abap field.
Hi Sergei,
Is it possible to to create an XML file on the Application Server through an ABAP Program? do you have a sample?
thanks,
dattis
2005 Mar 15 2:20 PM
2005 Mar 15 3:37 PM
Did you try ABAP class <b>cl_xml_document</b>? It has <b>parse</b> method which should convert your source document into a hierarchical representation. I tried it in the opposite way, from ABAP to XML.
2005 Mar 15 7:19 PM
Hi Sergei,
Is it possible to to create an XML file on the Application Server through an ABAP Program? do you have a sample?
thanks,
dattis
2005 Mar 15 7:34 PM
You can definetely do this with <b>cl_xml_document</b>.
Suppose you have already created proper structure of the document in an instance of <b>cl_xml_document</b>. Then you can render an xml strucuture into arbitrary internal table with <b>render2table</b> method and then transfer the table to any file on Application Server with old good statements OPEN DATASET and TRANSFER.
2005 Mar 21 4:31 PM
Hello,
you need to parse your XML File into a Document Object
Model (DOM) using the iXML Parser.
Then you can use the DOM API to copy selected nodes
to a separate DOM (the nodes you are interested).
This new DOM you can transform into an ABAP data structure
using the statement
call transformation id...
Class CL_APL_ECATT_XML has a method for parsing
an XML (XML_TO_DOM).
Regards,
Marc
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |