Generating structured XML file based on relational data base
Hi,
I need to use XML DB to generate a structured XML file based on the relational oracle database. I start by using Oracle default table, emp,
Here is EMP data,
EMPNO ENAME DEPNO SAL
123.00 E1 20.00 1,000.00
124.00 E2 20.00 2,000.00
125.00 E3 20.00 2,000.00
126.00 E4 30.00 3,000.00
127.00 E5 30.00 3,000.00
128.00 E6 30.00 4,000.00
129.00 E7 40.00 7,000.00
I used this SQL statement to generate an XML output,
select XMLElement ("Department",
XMLAttributes(deptno as "DEPARTMENTNO"),
XMLElement("EmployeeName", ename),
XMLElement("Salary", sal)
) "Result"
from
emp
where
deptno=20
The result was
<Department DEPARTMENTNO="20">
<EmployeeName>E1</EmployeeName>
<Salary>1000</Salary>
</Department>
<Department DEPARTMENTNO="20">
<EmployeeName>E2</EmployeeName>
<Salary>2000</Salary>
</Department>
<Department DEPARTMENTNO="20">
<EmployeeName>E3</EmployeeName>
<Salary>2000</Salary>
</Department>
but I need this structure instead,
<Department DEPARTMENTNO="20">
<EmployeeName>E1</EmployeeName>
<Salary>1000</Salary>
<EmployeeName>E2</EmployeeName>
<Salary>2000</Salary>
<EmployeeName>E3</EmployeeName>
<Salary>2000</Salary>
</Department>
Could you guide me how I can generate this kind of structure like master-detail structure and which document you recommend to obtain this point.
Thanks,
Shiva
Hi,
If you want to write an xml into file, I think you should use PL/SQL.
Is it even possible to spool output into file without the query itself?
doen't show me a proper xml fileTo get well-formed xml, you also have to make a root element.
If you want <?xml version="1.0"?> also then use xmlroot(), but I haven't figure out
how to specify the encoding.
SQL> WITH xtab AS(SELECT 'E1' ename,20 depno,1000 sal FROM dual
2 UNION ALL
3 SELECT 'E2',20,2000 FROM dual
4 UNION ALL
5 SELECT 'E3',40,3000 FROM dual
6 UNION ALL
7 SELECT 'E4',30,4000 FROM dual)
8 SELECT XMLRoot(XMLElement("Company",XMLAgg(XMLElement("Department",
9 XMLattributes(depno as "DEPARTMENTNO"),
10 XMLAgg(XMLForest(
11 ename AS "EmployeeName",
12 sal AS "Salary"))))),version '1.0') company_xml
13 FROM xtab
14 GROUP BY depno;
COMPANY_XML
<?xml version="1.0"?>
<Company>
<Department DEPARTMENTNO="20">
<EmployeeName>E1</EmployeeName>
<Salary>1000</Salary>
<EmployeeName>E2</EmployeeName>
<Salary>2000</Salary>
</Department>
<Department DEPARTMENTNO="30">
<EmployeeName>E4</EmployeeName>
<Salary>4000</Salary>
</Department>
<Department DEPARTMENTNO="40">
<EmployeeName>E3</EmployeeName>
<Salary>3000</Salary>
</Department>
</Company>
[pre]
Similar Messages
-
How generate a XML file & how to save data in that file?
hi,
How to generate an xml file & how to add data in that xml file? is there anyone who can help me about this? Firstly i need to open a xml file and after that i need to save user data in that file? how i will do it? What will be the solution of this? please give me solution........
with regards
BinaWith an API like Xerces you can parse an XML document into a DOM tree. You can do modifications on that tree manually and then write it back out as XML data.
http://xerces.apache.org/xerces2-j/ -
Using SQL/XML Functions or XSU to generate structured XML file.
Hi,
I have a view on a relational database I need to generate an XMLfile based on that view. I need to have below structure
<Employees>
<Employee A>
<Employee info>
</Employee info>
< Contact info>
<Address>
</Address>
</Contact info>
</Employee>
<Employee B>
<Employee info>
</Employee info>
< Contact info>
<Address>
</Address>
</Contact info>
</Employee>
</Employees>
Also in the next step I need to read from XML file and transfer data to the Database.
For this situation which way is the best one to generate XML file, using SQL/XML functions (XMLELEMENT, XMLAGG,... ) or using XSU?
and which one is the best to extract data from XML file to Oracle database?
Oracle DB version: 9.2.0.8.0
SQL*Plus version: 10.2.0.1.0
Thanks,
ShivaI would do it from the database, but then again, I am a database / PL/SQL guy.
IMHO the database will deliver you with more options. I don't know about "speed" between the two. -
Create PO XML files based on Vendor Data ...
hi,
i have an idoc ORDERS.ORDERS05 and will contain various vendors as a one of the values in the IDOC.
Based on the different vendors i have in the IDOC, XI has to create various xml packets and send it through HTTP via SOAP adapter.
Each vendor will have a unique URL where the xml can be posted.
Any steps or docs will be helpful.
Thanks,
TirumalHi Tirumal,
First, you will need to configure a communication channel for each of the SOAP receivers.
Then, in Receiver Determination or Interface Determination, using the Condition Editor and XPath expression, you can examine the content of the IDoc and check for the vendor value. The Condition Editor will route the message to the specific Communication Channel, based on the value in the conditon.
Regards,
Bill -
How to generate an XML file from SSIS (based on an XSD)?
I have an XSD that describes an XML format. I also have a sample XML file as well from the XSD. I am trying to understand SSIS's capability to generate the XML file in an ETL process. I would need to create the XML file based on the XSD that
I have. It is safe to assume that all the data elements are in the DB that I am incorporating in the ETL and it is also safe to assume that the data in the XML may be from multiple different tables (so massaging is probably necessary).
Would this be a job for C#/VB or can I do this through an SSIS process/task? Please help me understand my options. Thanks.Dear All,
Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
string strXmlFile = "testXmlExport.xml";
myDataSet.WriteXmlSchema(strSchemaFile);
myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
but how do I export the .xml file so that is conforms with the .xsd format?
If any of you have worked this out the answer would be most appreciated.
All the best,
Nick
"Everything should be made as simple as possible, but not simpler" - Einstein -
How to generate XML file based on XSD in SSIS
please provide step by step process to create xml based on XSD in SSIS
Hi hemasankar,
In SQL Server Integrated Services, we can generate XML Schema (XSD) file based on a XML file with XML Source Editor. If we want to generate XML file based on a XSD file, we can use Generate Sample XML feature in Visual Studio. For more details, please refer
to the following steps:
Click on "XML Schema Explorer" or 'Use the XML Schema Explorer...' to open XML Schema Explorer in Visual Studio.
If your Schema file is valid and you are having elements, right-click on element and click on "Generate Sample XML", this functionality generates XML file in temp folder and open ups in the XML Editor.
The following two document about how to generate XML file based on a XSD file are for your reference:
http://msdn.microsoft.com/en-us/library/dd489258.aspx
http://www.codeproject.com/Articles/400016/Generate-Sample-XML-from-XSD
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Problem converting data in XML file to internal table data
Hi all,
I have a requirement. I need to convert an XML file to internal table data and based on that data do Goods Receipt in SAP.
With the help of this blog /people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
I am able to convert the XML file to data in SAP. But this blog will display the output on screen as ELELEMNT = nodename VALUE= value of that node.
But I donu2019t want in that way, I want to store all the data in XML file in an internal table so that I can make use of those values and do Goods Recipt in SAP.
Can some one suggest how should I read the data in an internal table.
Here is my code..what changes should I make?
*& Report z_xit_xml_check
REPORT z_xit_xml_check.
TYPE-POOLS: ixml.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
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:\temp\orders_dtd.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 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.
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.
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.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WRITE: / 'ELEMENT :'.
WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
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 :'.
WRITE: AT indent value COLOR COL_GROUP INVERSE.
ENDCASE.
advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
Any help would be highly apperciated.
regards,
Jessica SamPavel Vera,
With your example i tries doing the following .....
I tried to convert the data of XML file to internal table data. I am collecting the data in internal table to do goos recipt with that data.
Please find my XML file, ABAP pgm and XSLT pgm . I donu2019t know what I am missing I am not getting any output. I donu2019t know what is wrong please help me with this
Below is my XML file, My code and XSLT Program. In the below XML file I need to collect Vendor Number, Order Number, and Date tags which occur only once for one XML file.
I also need to collect the following tags from <Shipmentdetail>
<Shipmentdetail> has following child nodes and I need to collect them
TrackingNumber
Freight
Weight
ShipmentDate
ShipmentMethod
Need to collect to collect the following tags from <ProductInformation>
<ProductInformation> has following child nodes and I need to collect them
LineNumber
SKUNumber
OrderedQuantity
ShippedQuantity
UOM
The <Shipmentdetail> and <ProductInformation> are child nodes of <OrderShipment>
The <Shipmentdetail> occurs only ones but the <ProductInformation> can occur once or many times and will be dynamic and differs depening on the input file.
My XML file is as follows
<?xml version="1.0" encoding="iso-8859-1" ?>
- <ShipmentHeader>
<AccountID />
- <OrderShipment>
<VendorNumber>1000</VendorNumber>
<OrderNumber>P00009238</OrderNumber>
<OrderType>Stock</OrderType>
<Company />
<Division />
<Department />
<Date>20061120</Date>
<CartonCount>2</CartonCount>
<ShipAllProducts>No</ShipAllProducts>
- <ShipmentDetail>
<TrackingNumber>1ZR3W891PG47477811</TrackingNumber>
<Freight>000000010000</Freight>
<ShipmentDate>20061120</ShipmentDate>
<ShipmentMethod>UPS1PS</ShipmentMethod>
</ShipmentDetail>
- <ProductInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<OrderedQuantity>00000001000000</OrderedQuantity>
<ShippedQuantity>00000001000000</ShippedQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</ProductInformation>
- <ProductInformation>
<LineNumber>000000002</LineNumber>
<SKUNumber>938EN</SKUNumber>
<AdvSKUNumber>001 7294</AdvSKUNumber>
<SKUID />
<OrderedQuantity>00000000450000</OrderedQuantity>
<ShippedQuantity>00000000450000</ShippedQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</ProductInformation>
- <CaseInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<SSCCNumber>00000001668000002487</SSCCNumber>
<CaseQuantity>00000001000000</CaseQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</CaseInformation>
<CaseInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<SSCCNumber>00000001668000002487</SSCCNumber>
<CaseQuantity>00000001000000</CaseQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</CaseInformation>
- </OrderShipment>
</ShipmentHeader>
My Program
TYPE-POOLS abap.
CONSTANTS gs_file TYPE string VALUE 'C:\temp\test.xml'.
* This is the structure for the data from the XML file
TYPES: BEGIN OF ts_shipment,
VendorNumber(10) TYPE n,
OrderNumber(20) TYPE n,
OrderType(8) TYPE c,
Date(8) TYPE c,
END OF ts_shipment.
TYPES: BEGIN OF ts_shipmentdetail,
TrackingNumber(30) TYPE n,
Freight(12) TYPE n,
Weight(14) TYPE n,
ShipmentDate(8) TYPE c,
ShipmentMethod(8) TYPE c,
END OF ts_shipmentdetail.
TYPES: BEGIN OF ts_productinformation,
LineNumber(9) TYPE n,
SKUNumber(20) TYPE c,
OrderedQuantity(14) TYPE n,
ShippedQuantity(14) TYPE n,
UOM(4) TYPE c,
END OF ts_productinformation.
* Table for the XML content
DATA: gt_itab TYPE STANDARD TABLE OF char2048.
* Table and work ares for the data from the XML file
DATA: gt_shipment TYPE STANDARD TABLE OF ts_shipment,
gs_shipment TYPE ts_shipment.
DATA: gt_shipmentdetail TYPE STANDARD TABLE OF ts_shipmentdetail,
gs_shipmentdetail TYPE ts_shipmentdetail.
DATA: gt_productinformation TYPE STANDARD TABLE OF ts_productinformation,
gs_productinformation TYPE ts_productinformation.
* Result table that contains references
* of the internal tables to be filled
DATA: gt_result_xml TYPE abap_trans_resbind_tab,
gs_result_xml TYPE abap_trans_resbind.
* For error handling
DATA: gs_rif_ex TYPE REF TO cx_root,
gs_var_text TYPE string.
* Get the XML file from your client
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = gs_file
CHANGING
data_tab = gt_itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
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.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "ISHIPMENT".
GET REFERENCE OF gt_shipment INTO gs_result_xml-value.
gs_result_xml-name = 'ISHIPMENT'.
APPEND gs_result_xml TO gt_result_xml.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "ISHIPDET".
GET REFERENCE OF gt_shipmentdetail INTO gs_result_xml-value.
gs_result_xml-name = 'ISHIPDET'.
APPEND gs_result_xml TO gt_result_xml.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "IPRODDET".
GET REFERENCE OF gt_productinformation INTO gs_result_xml-value.
gs_result_xml-name = 'IPRODDET'.
APPEND gs_result_xml TO gt_result_xml.
* Perform the XSLT stylesheet
TRY.
CALL TRANSFORMATION z_xml_to_abap3
SOURCE XML gt_itab
RESULT (gt_result_xml).
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
* Writing the data from file for gt_shipment
*Collecting the Shipping Data from the XML file to internal table gt_shipment
*and writing the data to the screen
LOOP AT gt_shipment INTO gs_shipment.
WRITE: / 'VendorNumber:', gs_shipment-VendorNumber.
WRITE: / 'OrderNumber :', gs_shipment-OrderNumber.
WRITE: / 'OrderType :', gs_shipment-OrderType.
WRITE: / 'Date :', gs_shipment-Date.
WRITE : /.
ENDLOOP. "gt_shipment.
LOOP AT gt_shipmentdetail INTO gs_shipmentdetail.
WRITE: / 'TrackingNumber:', gs_shipmentdetail-TrackingNumber.
WRITE: / 'Freight :', gs_shipmentdetail-Freight.
WRITE: / 'Weight :', gs_shipmentdetail-Weight.
WRITE: / 'ShipmentDate :', gs_shipmentdetail-ShipmentDate.
* WRITE: / 'ShipmentMethod :' gs_shipmentdetail-ShipmentMethod
WRITE : /.
ENDLOOP. "gt_shipmentdetail.
LOOP AT gt_productinformation INTO gs_productinformation.
WRITE: / 'LineNumber:', gs_productinformation-LineNumber.
WRITE: / 'SKUNumber :', gs_productinformation-SKUNumber.
WRITE: / 'OrderedQuantity :', gs_productinformation-OrderedQuantity.
WRITE: / 'ShippedQuantity :', gs_productinformation-ShippedQuantity.
WRITE: / 'UOM :', gs_productinformation-UOM.
WRITE : /.
ENDLOOP. "gt_productinformation.
XSLT Program
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<ISHIPMENT>
<xsl:apply-templates select="//OrderShipment"/>
</ISHIPMENT>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="OrderShipment">
<item>
<VENDORNUMBER>
<xsl:value-of select="VendorNumber"/>
</VENDORNUMBER>
<ORDERNUMBER>
<xsl:value-of select="OrderNumber"/>
</ORDERNUMBER>
<ORDERTYPE>
<xsl:value-of select="OrderType"/>
</ORDERTYPE>
<DATE>
<xsl:value-of select="Date"/>
</DATE>
</item>
</xsl:template>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<ISHIPDET>
<xsl:apply-templates select="//OrderShipment/ShipmentDetail"/>
</ISHIPDET>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="ShipmentDetail">
<item>
<TRACKINGNUMBER>
<xsl:value-of select="TrackingNumber"/>
</TRACKINGNUMBER>
<FREIGHT>
<xsl:value-of select="Freight"/>
</FREIGHT>
<SHIPMENTDATE>
<xsl:value-of select="ShipmentDate"/>
</SHIPMENTDATE>
<SHIPMENTMETHOD>
<xsl:value-of select="ShipmentMethod"/>
</SHIPMENTMETHOD>
</item>
</xsl:template>
</xsl:transform> .
Any help is highly appreciated. If anyone encountered this situation before please let me know where i am going wrong in my XSLT transformation.
Any Help will be highly apppreciated. Thanks in advance
Regards,
Jessica Sam -
How do we create generate webservices.xml file?
Hi all,
Im new to webservices...
im able to generate mapping.xml file using wsgenerate
but i dont know how do we generate webservices.xml.
Im waiting for ur reply.
http://tech.groups.yahoo.com/group/completeJava/
http://tech.groups.yahoo.com/group/completeJava/messages
http://completejava-group.blogspot.com/You use the web interface of xmlsidecar generator made by Johannes Henseler and the push the button there "generate". Copy paste that into a plain text file and then change tex extension from txt to xml. That's how you do a sidecar.xml the easy way.
Afterwards, yo've got to import "multiple files" (or "many files"... my DPS is a Spanish one) from Folio Builder.
If the folder are structured properly, folio builder will start swallowing the data of sidecar and uploading the articles.
Right now, while posting this, my pc is doing that with about one hundred articles. As happy and busy as a beaver in heat
Gustavo (Posting from Madrid) -
How to generate a XML file from a XML schema...?
Hi guys...!
I have a XML schema and I want to write a XML file based on that schema. I have heard about this feature that eclipse has, which given a XML schema, can generate a XML file for you.
Does anyone of you know about this feature? or is there another way to do it. The schema that I have is very huge...
I will really appreciate any help from you guys...
Thank...you..
--- Spirit Away...don't cross post
http://forum.java.sun.com/thread.jspa?threadID=649205&tstart=10 -
Generating a XML file from a JSP request Page
Hi,
I am very new to JAVA with XML. My need is i want to capture some data in in a JSP page then after submitting ,it will generate a XML file. How can i do that??? Any help will be highly appriciated. If anybody can give me a good example....
Thx<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
Are you using our XML SQL Utility that comes with the Oracle XDK for Java? Is the correct result produced, but you are having trouble writing it to a file?<HR></BLOCKQUOTE>
hi steven,
yes i am using xml sql utility and have solved the problem..... as i was working from a remote system i didnot give the correct path that is the c:\.....etc of the machine i was giving http:// thats why i did not write to a file... now its working -
Hi,
How do we generate an XML file from data in an internal table.
Regards
RaniHi Rani,
Take a look at thread:
XML to ABAP
Regards,
John. -
Can ditto select files based on modification date?
Hi. I'm trying to use ditto to make backups. I would like to have it select only files modified after a certain date. Is there a way to do this?
I noticed the bom (bill of materials) option... can that be used for this purpose somehow? Not quite sure how best to create a BOM that includes only files based on modification date.
Any suggestions? Thanks
Ericditto doesn't provide a way to select only files modified after a certain date -- but find does; see the "-newer" and "-newerXY" options. Using find, you can generate a BOM file listing files that have been modified after a certain date.
Then you can pass that BOM file to ditto.
Powerbook G4 1GHz Mac OS X (10.3.9) -
Cannot generate stack.xml file
Greetings,
We are not able to generated stack.xml file in /usr/sap/trans/EPS/in
We have tried in /n/tmwflow/mopz_stack.
MOPZ is configured we are able to approve support patches
This xml file is required to upgrade the ECC_DIMP from 600 to 605
Please advice
R..../-Wrote to SAP. Got the below mentioned reply from them
Please make sure that in transaction SMSY, in the Header Data tab for
the system you want to upgrade, both ERP 6 and EHP5 for ERP 6 are added
as product versions and also active. Information about why this is
needed can be found in note 1464712.
Please don't forget to choose a relevant product instance for ERP 6.
After this is done, please enter the system in an ERP 6 logical
component. Please add the new ERP 6 logical component to another
solution, and please proceed to opening the Maintenance Optimizer
transaction from the solution with the ERP 6 logical component.
The option to choose should be 'Enhancement Package install'.
The technical usage to choose is Discrete Ind.& Mill Products.
If somehow you are not able to choose technical usage Discrete Ind.&
Mill Products in the technical usage screen in Maintenance Optimizer:
please check note 1324838 for the required product instances of ERP 6
in SMSY. -
Hi ,
I have a requirement where i have to generate an XML file for each record in a custom table .
The data in the custom table needs to be segregated as different nodes .
eg .
<Invoice>
<Billto></Billlto>
<Shipto></Shipto>
<Customer>
<name></name>
<street></street>
<city></city>
</Customer>
<Payment>
<method> </method>
<reference></reference>
</Payment>
</Invoice>
Will it be possible to generate such a file when all the data is in one table ?
Please let me know
Thanks and Regards
SujathaYes it can. You are looking for XMLElement and XMLDocument to accomplish your goal. You didn't mention a version so I just pointed you to the latest.
Dup of {thread:id=863624} which has more info.
Edited by: A_Non on Feb 24, 2009 9:32 AM. Added link to dup. -
Generate an XML file from a DOM tree
Hi,
I'm trying to generate an XML file from a DOM tree that I obtained from another XML file with the Xerces library. I used the following operation :
public static void writeXmlFile(Document doc, String filename) {
try {
Source source = new DOMSource(doc);
File file = new File(filename);
Result result = new StreamResult(file);
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
} catch (TransformerConfigurationException e) {
System.err.println(e);
System.exit(1);
} catch (TransformerException e) {
System.err.println(e);
System.exit(1);
But I have this Windows/Linux problem. When I execute this on Windows, everything is correct. But if I try on Linux (every distribution does the same thing), I obtain an XML file where everything is written on just ONE LINE : there is neither identation nor carriage return at the end of a line ... And that is pretty annoying 'cause I need to SEE what I generate ...
Thanks for your answer,
Blueberryfin.Actually I would think that no indents and no new-lines would be more correct, but maybe it's an option for parsers to do it either way if you don't specify it. If you want to specify it, look at this post from last month:
http://forum.java.sun.com/thread.jsp?forum=34&thread=383400
Maybe you are looking for
-
Declare objects globally or pass as parameter in Package
Hi All, Need a technical suggestion, in a package i am having several functions, say Fn_A calling Fn_B and Fn_B calling Fn_C and Fn_C calling Fn_D and i need a collection of Nested Table Objects to be processed at Fn_D, and it has to reach from Fn_A,
-
Loading datafrom a PL/SQL table into the Database table
I have created two procedures to try and achieve the problem at hand. It retrieves and displays the record from a DBMS_OUTPUT.PUT_LINE prospective as indicated in (1&2), but I am having difficulty loading these values into a PL/SQL table from the pac
-
Itunes wont install on windows xp pro x64
right then i am having issues installing itunes on win xp x64 the installer goes all the way then i get the "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience" message then when i send the information i get a lin
-
Transaction launcher not working for custom business role in WEB UI
Hi Experts, we have maintained a link for activity reports in web Ui which triggers a program Z_CRM_TIME_REPORT . we have maintained the logical links and assigned them to the custom business role. when we run the program in SE38 in GUI its working f
-
Printer not holding it's PCL settting "Raw character printing"
I have some older HP printers where I can send PCL commands to the printers (font, size,orientation, etc.) using a program in Unix,. I can send multiple jobs to that printer and it holds the setting sent to the printer until I send the default PCL se