Convert xml file to fmb (very urgent)
We have application based on oracle forms version 10gr1 (9.0.4.1). We want to migrate to oracle forms 10gr2. We are using windows 2003.When I trying running command line
<oracle_home>\bin\frmxml2f.bat userid=.../...@.. sample_fmb.xml overwrite=yes
I have error message:
error connecting to database
jniconnect failed
Record group don't have query. The database connect is fine, I try from same command line using sqlplus. I have TNS_ADMIN string in registry setup. I don't understand what the problem is.
Thanks M
TNS_ADMIN is generally not read from the registry, but instead from the system variables (My Computer > Properties > Advanced > Environment Variables...)
In the DOS window you are using to run the batch, first set the TNS_ADMIN, ORACLE_HOME, and PATH. For example:
set TNS_ADMIN=C:\oracle\product\ids1012\network\admin
That said, I would not recommend taking XML files from 9041 and try to convert them in 10.1.2. That was not how the xml formatted files were intended to be used. I would recommend converting to FMB in 904 then upgrading and/or compiling the FMB in 10.1.2
Similar Messages
-
How to convert forms .fmx to .fmb --very urgent accedently deleted the fmb
Hi,
I have accedently deleted the files forms fmb, under cmd. I dont have any third party tool , to undelete my files.
Tell me any way to convert the exefiles .fmx to .fmb
Thanks
Regards
S. DjeanthiCheck the recycle bin
Avoid new Change Requests
Search for older versions
or
Lastly, dont tell anyone and
Quit the job as soon as possible ... dissappear as the fmbs did
Sry Mate -
How to convert XML file to an internal table ?
Hi All,
I want to do a batch input program. The source data would be given as an excel file . I would like to know how to convert XML file to internal table properly. Please help me out..
Thanking you in advance ..
Shankara Narayanan T.VHi Shankar,
use 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file1
i_begin_col = '1'
i_begin_row = '5'
i_end_col = '40'
i_end_row = '16'
TABLES
intern = it_intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT it_intern.
AT NEW row.
CLEAR it_intern.
ENDAT.
CASE lv_flag.
Production Version
WHEN 1.
it_master-matnr = it_intern-value.
WHEN 2.
it_master-werks = it_intern-value.
WHEN 3.
it_master-verid = it_intern-value.
WHEN 4.
it_master-text1 = it_intern-value.
WHEN 5.
it_master-fdate = it_intern-value.
AT END OF row.
APPEND it_master.
ENDAT.
ENDLOOP.
-Anu
Message was edited by:
Anupama Reddy -
Dear friends
For converting XML file to SAP, I used TEXT_CONVERT_XML_TO_SAP function module. In this I have some doubt. Pls clarify this.
1. I am getting run time error with type h.
2 I_FIELD_SEPERATOR = ';'
I_LINE_HEADER =
I_TAB_RAW_DATA =
I_FILENAME =
I_TOTALSIZE =
for the above parameter what are the value has to passed.
Thanks.Hi,
Take a look in this code:
*& Report z_xit_xml_check
REPORT z_xit_xml_check.
TYPE-POOLS: ixml.
DATA: BEGIN OF t_cabec OCCURS 0.
INCLUDE STRUCTURE zmmt2010.
DATA END OF t_cabec.
DATA: BEGIN OF t_item OCCURS 0.
INCLUDE STRUCTURE zmmt2011.
DATA END OF t_item.
DATA: BEGIN OF t_itemt OCCURS 0.
INCLUDE STRUCTURE zmmt2012.
DATA END OF t_itemt.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA check_item(1).
DATA check_itemt(1).
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\xml.xml'.
START-OF-SELECTION.
PERFORM busca_xml.
PERFORM carrega_tabela.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = pa_file.
upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
DATA v_codcat TYPE zmmt2011-codcat.
DATA v_master_for TYPE zmmt2011-master_for.
node ?= document.
CHECK NOT node IS INITIAL.
IF node IS INITIAL. EXIT. ENDIF.
create a node iterator
iterator = node->create_iterator( ).
get current node
node = iterator->get_next( ).
loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
element node
name = node->get_name( ).
TRANSLATE name TO LOWER CASE.
IF name = 'iten'.
MOVE 'I' TO check_item.
ENDIF.
IF name = 'cabec'.
MOVE 'C' TO check_item.
ENDIF.
IF name = 'iten_texto'.
MOVE 'T' TO check_item.
ENDIF.
nodemap = node->get_attributes( ).
IF NOT nodemap IS INITIAL.
attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
text node
value = node->get_value( ).
IF check_item = 'C'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'lifnr'. MOVE value TO t_cabec-lifnr.
WHEN 'codcat'.
MOVE value TO t_cabec-codcat.
MOVE value TO v_codcat.
WHEN 'bukrs'. MOVE value TO t_cabec-bukrs.
WHEN 'zterm'. MOVE value TO t_cabec-zterm.
WHEN 'waers'. MOVE value TO t_cabec-waers.
WHEN 'inco1'. MOVE value TO t_cabec-inco1.
WHEN 'inco2'. MOVE value TO t_cabec-inco2.
WHEN 'telf1'. MOVE value TO t_cabec-telf1.
WHEN 'verkf'. MOVE value TO t_cabec-verkf.
WHEN 'datav'.
MOVE value TO t_cabec-datav.
APPEND t_cabec.
ENDCASE.
ENDIF.
IF check_item = 'I'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'master_for'.
MOVE value TO t_item-master_for.
MOVE value TO v_master_for.
WHEN 'werks'. MOVE value TO t_item-werks.
WHEN 'versao'. MOVE value TO t_item-versao.
WHEN 'matkl'. MOVE value TO t_item-matkl.
WHEN 'j_1bindus3'. MOVE value TO t_item-j_1bindus3.
WHEN 'j_1bmatuse'. MOVE value TO t_item-j_1bmatuse.
WHEN 'j_1bmatorg'. MOVE value TO t_item-j_1bmatorg.
WHEN 'j_1bnbmco1'. MOVE value TO t_item-j_1bnbmco1.
WHEN 'bsgru'. MOVE value TO t_item-bsgru.
WHEN 'ekgrp'. MOVE value TO t_item-ekgrp.
WHEN 'txz01'. MOVE value TO t_item-txz01.
WHEN 'epstp'. MOVE value TO t_item-epstp.
WHEN 'netpr'. MOVE value TO t_item-netpr.
WHEN 'peinh'. MOVE value TO t_item-peinh.
WHEN 'meins'. MOVE value TO t_item-meins.
WHEN 'plifz'. MOVE value TO t_item-plifz.
WHEN 'mwskz'. MOVE value TO t_item-mwskz.
WHEN 'steuc'.
MOVE value TO t_item-steuc.
MOVE v_codcat TO t_item-codcat.
APPEND t_item.
ENDCASE.
ENDIF.
IF check_item = 'T'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'linha'. MOVE value TO t_itemt-linha.
WHEN 'txlng'. MOVE value TO t_itemt-txlng.
MOVE v_master_for TO t_itemt-master_for.
MOVE v_codcat TO t_itemt-codcat.
append t_itemt.
ENDCASE.
ENDIF.
ENDCASE.
advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
*& Form Busca_XML
text
--> p1 text
<-- p2 text
FORM busca_xml .
DATA: lc_mess(70) TYPE c,lv_tab.
TYPES: BEGIN OF ty_zvmsgorgtr.
INCLUDE STRUCTURE zmmt2011.
TYPES END OF ty_zvmsgorgtr.
Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table =
l_xml_table size = l_xml_table_size ).
Creating a document
l_document = l_ixml->create_document( ).
Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
ENDFORM. " Busca_XML
*& Form Carrega_Tabela
text
--> p1 text
<-- p2 text
FORM carrega_tabela .
Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
ENDFORM. " Carrega_Tabela -
How to convert xml file to xsl using java
Hi all,
I have an XML file with which i need to convert(transform) it to an xsl file using java.
I am new to converting xml file to xslt.Please send me if u have code .
Thanks in advance
regards
RamYou seem to be asking the wrong question. An XSL file can be used to transform an XML file, but transforming an XML into an XSL does not make sense. The API for running XSL transforms on the Java platform is described here:
http://java.sun.com/javase/6/docs/api/javax/xml/transform/package-summary.html -
How to convert XML file to excel file
To convert XML file to excel file. what are the jar files required. also tutorial to convert XML File to excel file
Gotta use your own imagination.
I'd have a root tag <excel-spreadsheet>. Under that I'd have a <worksheet> tag for each worksheet. Under that I'd have a <row> tag for each row. Each <row> tag would have <column> tags, with "name" attribute, and the spreadsheet entry as the value.
The problem is that you can't really map everything that will go into a spreadsheet into this stream (e.g., graphs, stray cells, etc.) It maps well to tables, but that's it. -
How to convert XMl file to XSD file
how to convert XMl file to XSD file ?
i have a xml file format it has to be converted to xsd file through ABAP .
Regards
Anbu Bi got the answer....
Regards
Anbu B -
Convert XML file into PDF file
<b>XML to PDF</b>i want to Convert XML file into PDF file pl. any one can suggests API's
Hi,
There are many ways to convert XML files to PDFs through java.
One of the easiest way is by using iText.jar which have classes for conversion.
The following are the required steps
1. Create a document object for the XML file ( Using DOM or SAX parser).
2. Parse the xml document and extract the content to write in PDF.
3.Create a itext Document object.
4.Get a PdfWriter instance for the PDF file.
5.Write in the pdf the extracted text using the document object.
Refer <a href="http://itextdocs.lowagie.com/examples/com/lowagie/examples/general/HelloWorld.java">here</a> for a simple pdf writer example.
Refer <a href="http://java.sun.com/developer/codesamples/xml.html">here</a> for examples of XML Parsers.
Regards,
Uma -
Convert xml file to a 2D list - Urgent!!!
I have a xml file like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map SYSTEM "map.dtd">
<map width="5" height="3" goal="6" name="Hallways of Dooom">
<random-item type='lantern' amount='5' />
<random-item type='health' amount='10' />
<tile x="1" y="0" type="floor">
<renderhint>floor:wood</renderhint>
</tile>
<tile x="0" y="1" type="floor" />
<tile x="1" y="1" type="floor" startlocation="1" />
<tile x="2" y="0" type="wall" />
<tile x="3" y="0" type="wall" />
<tile x="3" y="1" type="floor">
<item type="treasure">Bar of Silver</item>
<renderhint>floor:stone,blood</renderhint>
</tile>
</map>and i want to convert it to a 2D list, with the x-value of the list is the width of the map and the y-value of the list is the height of the map. The x and y value in the tile indicates the position of the point.
i have already parse the xml file to java using:
public class parsexml
public static void main(String[] args)
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(true);
factory.setIgnoringElementContentWhitespace(true);
try {
DocumentBuilder parser = factory.newDocumentBuilder();
Document doc = parser.parse(new File("hallways.xml"));
System.out.println("XML file parsed.");
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}Can anyone give me any hint on what to do next. Thank you very much.mujingyue wrote:
Thank you for your poem, it is the hightlight of my miserable day.
but, any suggestions?Sure....
You play tricks on my mind
You're everywhere but you're so hard to find
You're not warm or sentimental
You're so extreme, you can be so temperamental
But I'm not looking for a love that will last
[ Urgent song text brought to you by LyricsYouLove ]
I know what I need and I need it fast
Yeah, there's one thing in common that we both share
That's a need for for each other anytime, anywhere
It gets so urgent
So urgent
You know it's urgent
I wanna tell you it's the same for me
So oh oh urgent
Just you wait and see
How urgent our love can be
It's urgent
You say it's urgent
Make it fast, make it urgent
Do it quick, do it urgent
Gotta rush, make it urgent
Want it quick
Urgent, urgent, emergency
Urgent, urgent, emergency
Urgent, urgent, emergency
Urgent, urgent, emergency
So urgent, emergency
Emer... emer... emer...
It's urgent -
Convert XML file to Jave -- URGENT
Hi All,
I am new to java xml.
I got requirment like that.. source file is xml.. I need to read xml thru java and if any 0(Zeros) are found in any nodes of xml, then I need to comment thta particular node and store the output in new xml file with inserted comments.
Please any one help me in this regard..
How can I start ..?
Thanks
HTHHTH,
Use Dom for Java API. i.e dom4j.jar which is readily available on http://docjar.com site.
Using that JAR you can able to give a comment for your XML file.
regards
Rajesh -
Converting xml file with arabic content to pdf using FOP
Hello all
I am trying to convert a dynamically generated xml file in which most of the data comes from the oracle database with arabic content, to pdf using FOP. I have used "Windows-1256" encoding for the xml. If i open the xml generated with the internet explorer the arabic content displays properly but the pdf is not generated and the acrobat reader shows the file as corrupted or not supported. Please help me. Its very urgent.
Thanks & Regards
Gurpreet SinghThere is no direct support for importing RTF from an XML extract. Perhaps feature 1514 "Mapping formatted XML data into multiline field" will be of some use. This was released in 11.0, I believe.
Essentially you can establish paragraph and certain text formatting like bold and underline when you include the proper token information in the data. I believe this is similar to simple HTML tokens.
Example: <FIELD><P>First paragraph of data.</P><P>New paragraph with <B><U>bold and underline text</U></B>. Rest of paragraph normal.</P></FIELD>
The result is something like this:
<P>First paragraph of data.</P><P>New paragraph with <B><U>bold and underline text</U></B>. Rest of paragraph normal.</P> -
How use class file in jsp(very urgent)
i have class file called birds (birds is actually a xslt file transformed to java class file) now this class file i have to use in my jsp file. how can i use them. if possible can any one give me sample code please very urgent
can any one help mejava files
import org.w3c.dom.*;
import javax.servlet.http.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
import java.io.*;
public class XmlParser
public String XmlParser()
try
String strXML= "employee.xml";
String xslFile = "employeeId.xsl";
TransformerFactory tFactory = TransformerFactory.newInstance();
StreamResult theTransformationResult = new StreamResult( new ByteArrayOutputStream() );
Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
transformer.transform(new StreamSource(new StringReader(strXML)), theTransformationResult);
String output = theTransformationResult.getOutputStream().toString()
catch(Exception e)
System.out.println(" ***** XmlParser.XmlParser ERROR ***** " + e);
return output;
using class files in jsp
<%@ page import="com.qqqq.aaaa.XmlParser"%>
<%
XmlParser xmlParser = new XmlParser();
out.println(xmlParser.XmlParser());
%>
i think it will help you. -
Convert xml file into a JDOM Element object?
Hi,
I need to convert an xml file into a JDOM Element object.
I need to do that because I need to pass the JDOM Element object to another method for processing.
That method takes in a JDOM element object as a single parameter for that method: it was supplied by my supervisor.
Does anyone knows how to do that?
Please advice and give me some example.
Regards.Hi,
You misunderstood me.
The javaworld article shows you how to convert the xml file to JDOM Document object using SAXBuilder; I am very aware of it as I had done it before.
Now the problem is tha tI need to convert the xml file to JDOM Element object instead.
The JDOM Element object contains the whole xml file and that JDOM Element object will be input into a parameter of a method for use.
Can anyone help? -
I want to convert XML file into SAP Internal table
Hi Frndz,
My xml file is:
<?xml version="1.0" ?>
- <!-- Comments: START DATE :1/11/2002 11:26:14 PM
-->
- <!-- Comments: RFID Tags read by Mercury4 Copyright Praff@Anantara Solutions
-->
<RFIDs><ID>0x303030303030303035050000B5EC</ID><ID>0x300833B2DDD901403505000042E7</ID></RFIDs>
i want to take those 2 ID's in a internal table that id field is of 28 character type....
very urgent.
Thanks,
Arunprasad.Pclass cl_ixml definition load.
type-pools: ixml.
types: begin of t_xml_line,
data(256) type x,
end of t_xml_line,
begin of tsfixml,
data(1024) type c,
end of tsfixml.
data: l_ixml type ref to if_ixml,
l_streamfactory type ref to if_ixml_stream_factory,
l_parser type ref to if_ixml_parser,
l_istream type ref to if_ixml_istream,
l_document type ref to if_ixml_document,
l_node type ref to if_ixml_node,
l_xmldata type string.
data: l_elem type ref to if_ixml_element,
l_root_node type ref to if_ixml_node,
l_next_node type ref to if_ixml_node,
l_name type string,
l_iterator type ref to if_ixml_node_iterator.
data: l_xml_table type table of t_xml_line,
l_xml_line type t_xml_line,
l_xml_table_size type i.
data: l_filename type string.
parameters: pa_file type char1024 default
'C:\WINDOWS\Desktop\RFIDTags.xml'.
*Validation of XML file: Only DTD included in xml document is supported
parameters: pa_val type char1 as checkbox.
start-of-selection.
*Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
*Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
perform get_xml_table changing l_xml_table_size l_xml_table.
*wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
size = l_xml_table_size ).
*Creating a document
l_document = l_ixml->create_document( ).
*Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
*Validate a document
if pa_val eq 'X'.
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
endif.
*Parse the stream
if l_parser->parse( ) ne 0.
if l_parser->num_errors( ) ne 0.
data: parseerror type ref to if_ixml_parse_error,
str type string,
i type i,
count type i,
index type i.
count = l_parser->num_errors( ).
write: count, ' parse errors have occured:'.
index = 0.
while index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
write: 'line: ', i.
i = parseerror->get_column( ).
write: 'column: ', i.
str = parseerror->get_reason( ).
write: str.
index = index + 1.
endwhile.
endif.
endif.
*Process the document
if l_parser->is_dom_generating( ) eq 'X'.
perform process_dom using l_document.
endif.
*& Form get_xml_table
form get_xml_table changing l_xml_table_size type i
l_xml_table type standard table.
*Local variable declaration
data: l_len type i,
l_len2 type i,
l_tab type tsfixml,
l_content type string,
l_str1 type string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab type table of string.
l_filename = pa_file.
*upload a file from the client's workstation
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = l_filename
FILETYPE = 'BIN'
IMPORTING
FILELENGTH = l_xml_table_size
HEADER =
TABLES
DATA_TAB = l_xml_table
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Writing the XML document to the screen
CLEAR l_str1.
LOOP AT l_xml_table INTO l_xml_line.
c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data
replacement = space ).
c_conv->read( IMPORTING data = l_content len = l_len ).
CONCATENATE l_str1 l_content INTO l_str1.
ENDLOOP.
l_str1 = l_str1+0(l_xml_table_size).
SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
WRITE: /.
WRITE: /' XML File'.
WRITE: /.
LOOP AT l_itab INTO l_str1.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab
IN
l_str1 WITH space.
WRITE: / l_str1.
ENDLOOP.
WRITE: /.
endform. "get_xml_table
*& Form process_dom
form process_dom using document type ref to if_ixml_document.
data: node type ref to if_ixml_node,
iterator type ref to if_ixml_node_iterator,
nodemap type ref to if_ixml_named_node_map,
attr type ref to if_ixml_node,
name type string,
prefix type string,
value type string,
indent type i,
count type i,
index type i.
data: name2 type string,
name_root type string,
node_parent type ref to if_ixml_node,
node_root type ref to if_ixml_node,
num_children type i.
node ?= document.
check not node is initial.
uline.
write: /.
write: /' DOM-TREE'.
write: /.
if node is initial. exit. endif.
create a node iterator
iterator = node->create_iterator( ).
get current node
node = iterator->get_next( ).
loop over all nodes
while not node is initial.
indent = node->get_height( ) * 2.
indent = indent + 20.
num_children = node->num_children( ).
case node->get_type( ).
when if_ixml_node=>co_node_element.
element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
node_root = node->get_root( ).
name_root = node_root->get_name( ).
write: / 'ELEMENT :'.
write: at indent name color col_positive inverse.
write: 'NUM_CHILDREN:', num_children.
write: 'ROOT:', name_root.
node_parent = node->get_parent( ).
name2 = node_parent->get_name( ).
write: 'NAME2: ' , name2.
if not nodemap is initial.
*attributes
count = nodemap->get_length( ).
do count times.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
write: / 'ATTRIBUTE:'.
write: at indent name color col_heading inverse, '=',
value color col_total inverse.
enddo.
endif.
when if_ixml_node=>co_node_text or
if_ixml_node=>co_node_cdata_section.
*text node
value = node->get_value( ).
write: / 'VALUE :'.
node_parent = node->get_parent( ).
write: at indent value color col_group inverse.
name2 = node_parent->get_name( ).
write: 'NAME2: ' , name2.
endcase.
*advance to next node
node = iterator->get_next( ).
endwhile.
endform. "process_dom
Thanks,
Arunprasad.P -
Java code to convert XML file to ISO XML format
Hi Experts,
I need to convert an XML file to ISO Xml format using Java code.I dont have any idea about the ISO XML format.I searched but what i am getting is ISO is an encoding in XML.
It will be very helpful if any one can give me a sample ISO XML file, and any way around to carry out the required conversion.
Thanks .
AnikaHi,
For ISO encoding you need the XML file to be converted with below providing the encoding paramter as ISO. for e.g.
<?xml version="1.0" encoding="ISO-8859-1"?>
instead of
<?xml version="1.0" encoding="UTF-8"?>
this can be possible with using XML encoders.
Refer XML encoding--> http://www.w3schools.com/XML/xml_encoding.asp
Refer Java Code with uasage of XMLEncoder
http://java.sun.com/j2se/1.4.2/docs/api/java/beans/XMLEncoder.html
Thanks
Swarup
Maybe you are looking for
-
Configure Service Desk in SAP Solution Manager
Hi guys, I'm currently trying to configure SAP Service desk to our custumers but i really dont know how much steps i must take to do that. Im currently have users from satellite systems generated by tcode BP_GEN in Business Partners. But, how it real
-
Hi, We are using BPM to insert a JDBC table. The send step takes 5 mins to insert 10k records. We have used similar design in other processes but does not take much time,. What would be the issue? Regards Krish
-
Hi Is it possible to create a dynamic selection of tables in the 'from' clause. Thanks in advance
-
When starting FF4 RC1 maximized, tabs ("tabs on top" mode) are cut off on top. To restore their normal display, you restore and maximize the window again.
-
Edited photos not updating on AppleTV
I have a problem with photos that I have edited on iphoto08 not updating on my apple TV. The original un-edited photo remains! Any ideas? Thanks Glenn