Generate piped-delimited formate from xml formate.
Does anybody know how to create a parser which will take any XML file and convert it into a pipe-delimited format?
I need to generate a pip-delimited format file from a xml file.
XML describes a tree structure. You won't be able to convert it into a pipe-delimited structure unless there's additional structural elements there sufficient to allow it to describe trees. If you were thinking of just having newlines delimit records and pipes delimit fields, that probably won't cut it. You could list data redundantly or use blank fields to help describe the tree structure, but that may or may not be what you want.
[add]
The point is that you have to decide what format you want, exactly.
BTW I once did a project like this that created an HTML table (another square format) from an XML document. We used SAX. It was pretty straightforward if you just throw a stack in there. But again you have to flesh out the requirements of what the output format will be before you can proceed.
Edited by: paulcw on Jun 17, 2010 1:05 PM
Similar Messages
-
Uploading data from xml format
Hi Experts,
i am working under ' ZTOOLREV ' transaction which is plant maintainence. i maintain one rfc in se37.
import parameters are mandatory fields entering in this application , export parameters are for the errors -
it is of error structutre name.
further i am creating one web service using transaction ' WSCONFIG ' . so it will be coverted in xml data.
now my client will enter data in xml it has to come to sap and store in sap. and show if any errors.
my requirement is the data is coming from xml format. i have to upload data from xml.
what is the function module should be used to upload the data anad also what function module should used to handle errors?
here in this case i am using gui_download. but i want to put in export parameters.
which i maintained previously.
please guide me experts.
i can get a solution for this query because there are so many experts are there in sdn.sap.Hi Chaitanya,
You may use the following program to upload your xml data into internal table
REPORT z_read_xml_file.
PARAMETERS: p_filnam TYPE localfile OBLIGATORY
DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
DATA: l_v_fieldname TYPE dynfnam.
l_v_fieldname = p_filnam.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = l_v_fieldname
IMPORTING
file_name = p_filnam.
START-OF-SELECTION.
TYPES:
BEGIN OF ty_tab,
name TYPE string,
value TYPE string,
END OF ty_tab.
DATA:
lcl_xml_doc TYPE REF TO cl_xml_document,
v_subrc TYPE sysubrc,
v_node TYPE REF TO if_ixml_node,
v_child_node TYPE REF TO if_ixml_node,
v_root TYPE REF TO if_ixml_node,
v_iterator TYPE REF TO if_ixml_node_iterator,
v_nodemap TYPE REF TO if_ixml_named_node_map,
v_count TYPE i,
v_index TYPE i,
v_attr TYPE REF TO if_ixml_node,
v_name TYPE string,
v_prefix TYPE string,
v_value TYPE string,
v_char TYPE char2.
DATA:
itab TYPE STANDARD TABLE OF ty_tab,
wa TYPE ty_tab.
CREATE OBJECT lcl_xml_doc.
CALL METHOD lcl_xml_doc->import_from_file
EXPORTING
filename = p_filnam
RECEIVING
retcode = v_subrc.
CHECK v_subrc = 0.
v_node = lcl_xml_doc->m_document.
CHECK NOT v_node IS INITIAL.
v_iterator = v_node->create_iterator( ).
v_node = v_iterator->get_next( ).
WHILE NOT v_node IS INITIAL.
CASE v_node->get_type( ).
WHEN if_ixml_node=>co_node_element.
v_name = v_node->get_name( ).
v_nodemap = v_node->get_attributes( ).
IF NOT v_nodemap IS INITIAL
attributes
v_count = v_nodemap->get_length( ).
DO v_count TIMES.
v_index = sy-index - 1.
v_attr = v_nodemap->get_item( v_index ).
v_name = v_attr->get_name( ).
v_prefix = v_attr->get_namespace_prefix( ).
v_value = v_attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
text node
v_value = v_node->get_value( ).
MOVE v_value TO v_char.
IF v_char <> cl_abap_char_utilities=>cr_lf.
wa-name = v_name.
wa-value = v_value.
APPEND wa TO itab.
CLEAR wa.
ENDIF.
ENDCASE.
advance to next node
v_node = v_iterator->get_next( ).
ENDWHILE.
LOOP AT itab INTO wa.
ENDLOOP. -
Data Import from XML Format file
I want to import data from XML file format.Can i do it ? If yes then please give me more details in the step.
Pl read the below link.
It will be helpful.
SAP Business One Application
Jeyakanthan -
Quotation marks removed from XML formatting
See http://forums.adobe.com/message/4035539#4035539
The original data was
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/3.1">
<id>examples.html.HelloWorld</id>
<versionNumber>0.3</versionNumber>
<filename>HelloWorld</filename>
<initialWindow>
<content>HelloWorld.html</content>
<visible>true</visible>
<width>400</width>
<height>200</height>
</initialWindow>
<icon>
<image16x16>"-C C:/Program Files (x86)/Adobe/AIRSDK/samples/icons/."</image16x16>
<image32x32>"-C C:/Program Files (x86)/Adobe/AIRSDK/samples/icons/."</image32x32>
<image48x48>"-C C:/Program Files (x86)/Adobe/AIRSDK/samples/icons/."</image48x48>
<image128x128>"-C C:/Program Files (x86)/Adobe/AIRSDK/samples/icons/."</image128x128>
</icon>
</application>
but posting it as XML formatting removed the apostrophes (in the <icon> section). Not very good if you want to show how you've done something, or instruct another user how to do it...
Message was edited by: ʇɐb ɹəuəllıʍ - edited multiple times because of "unexpected error has occurred".apostrophes = '
Quotes = "
Colon = :
Semicolon = ;
Comma = ,
Period = . -
How can I generate Payment Instruction Register in XML format?
Hi,
I am going to customize the report "Payment Instruction Register". First of all, I have to get its data result in XML format. does anyone know how can to do that? Thanks a lot.
24BillyHi
Select report and click on view select output format as DATA you will get dta in xml format.If data is not there in drop down list,go to layout by clicking on edit report then select u r template check the output format as DATA also. -
Copying formatting from conditional formatting without the rules
I tend to use a lot of conditional formatting in my spreadsheets. Unfortunately, this leads to two problems:
1) I need more rules than are allowed (this seems to be related to the height of my screen... probably because the dialog box doesn't have a scrollbar)
2) This really, really slows things down, especially when combined with cell references, and particularly when I'm trying to rearrange cells (as far as I can see Numbers has a tendency to freeze and/or blank out the table I'm working on)
The easiest way I can see out of my predicament would be to somehow remove the conditional formatting rules while keeping the actual formatting... like copy-and-pasting values instead of the actual cells (with intact formulae). Is this possible? And if possible, how would I go about doing it?
Thanks in advance!Up to 15 rules can be set for conditional formating of a cell.
1)
Considering that the usual purpose of conditional formatting is to flag 'unusual' values, and to make the 'condition' instantly visible and recognizable, that seems an over generous number. If a cell or group of cells on your table 'needs' more than 15 possible formats (the base format and 15 others based on rules), perhaps what's needed is a re-thinking of why that many are needed, and whether having that many formats adequately answers that 'why'.
If you really do need that many, you can set then, even if your display height is filled with fewer than that. Additional rules may be inserted after any existing rule, not just the last one. note, though, that the conditions are evaluated in the order the rules are listed, from top to bottom, and the format is set by the first rule encountered whose condition is met.
2)
Not surprising. Numbers recalculates the entire table each time a value in the table is changed. That calculation includes through each list of conditional formatting rules until a match is found (or the end of the list is reached), and includes setting the new format for each affected cell.
3)
Not that I'm aware of. The base format of the cell may be copied (option-command-C) and pasted elsewhere (option-command-V), and that pair of operations will include any conditional format rules that had been set for the original cell.
But conditional formatting is just that—a set of rules that applies a set of attributes to a cell when a specific condition is met. The applied format exists only when the condition is met, and can't be copied except by copying the rule—actually the whole set of rules for that cell—which puts you no further ahead.
3a) You could, of course, change the base format of the cell to match the colour and style applied by the conditional rule, then clear the conditional format rules for that cell or set of cells. That would 'remove the rules while keeping the (applied) formatting', and would leave the formulas intact. seems to me a game not worth the candle, though.
Regards,
Barry -
Hi There!
We have an XML that we read into an XMLtype - and at a time we want to display it in a normal date type....
Its formatted as this: '2007-02-20T09:30:47.0Z' (Zero 0) - I guess it means no timezone in some ISO 86* standard
select TO_date('2007-02-20T09:30:47.0Z','YYYY-MM-DD"T"HH24:MI:SS.??????') from dual;
I have trie to find a format for reading it ... do you have an idea?
regards
MetteSorry, forgot to say that some of the dates in the XML field is in this format
'2007-02-20T09:30:47+100 ...... (yyyy-mm-dd"T"hh:mi:ssstzhtzm)
/Mette -
Do you need to generate HTML table rows from XML in InDesign?
General issue: you export XML and you get a bunch of content for xml elements that were a table in inDesign. But they don't have any rows, just cell after cell. What will make rows in your output?
Solution: XSLT; you need to use the @aid:tcols attribute of exported XML to determine the number of columns that your table should be. This is written in XSLT 1.1 so it shoud work with an export from InDesign. If you have problems with using it on export of XML, try using it on the XML afetr it has been exported, in Oxygen or other XSLT processor. Best to save acopy of your files before using the XSLT with them. Copy all of the plain text and past into a new file, save with your own filename, ending with .xsl file extension. Then when exporting XML from InDesign CS3-5, browse to your new .xsl file and select it. PLEASE read about XSLT files at w3c.schools or other resource if you want to understand what is going on with this file.
BTW <!-- indicates comments in code -->
<?xml version="1.0" encoding="UTF-8"?>
<!-- NO WARRANTY that this example code will work as written for your XML file in InDesign. You can add more templates to the output to map your heading styles to h1, h2, etc. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" exclude-result-prefixes="xsl aid aid5">
<xsl:output method="html" indent="yes" encoding="UTF-8"
doctype-public="http://www.w3.org/TR/xhtml/DTD/xhtml-transitional.dtd"/>
<!-- parameter to use the name of element with attribute aid:theader as the th output -->
<xsl:param name="tableElem">//*[local-name()][@aid:table='table']</xsl:param>
<xsl:param name="colheadStyle">
<xsl:value-of select="//*[local-name()][@aid:theader][1]"/>
<!-- i.e. colHead-->
</xsl:param>
<!-- parameter to use the name of element with attribute aid:cell but not aid:theader as the td output -->
<!--i.e. tabletext or whatever the name of your Cell level element is in InDesign -->
<xsl:param name="cellStyle">
<xsl:value-of select="//*[local-name()][@aid:table='cell' and not(@aid:theader)][1]"/>
</xsl:param>
<!-- handles a Story element marked up with HTML-type elements, but uses the <Table> element of IDD -->
<!-- if a true HTML table is in the content, it will be passed through -->
<xsl:template match="Story"><!-- make a basic HTML file from a Story -->
<html>
<head>
<title>Sample Table</title>
</head>
<body>
<xsl:apply-templates><!-- will handle direct text of the <Story>, and <Table> -->
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</body>
</html>
</xsl:template>
<!-- use the styles to find the elements of IDD <Table> element -->
<xsl:template match="Table">
<xsl:param name="colheadStyle">
<xsl:value-of select="$colheadStyle"/>
</xsl:param>
<xsl:param name="cellStyle">
<xsl:value-of select="$cellStyle"/>
</xsl:param>
<xsl:variable name="cellsPerRow">
<xsl:value-of select="@aid:tcols"/>
</xsl:variable>
<table><!-- start the table -->
<!-- xhtml requires lower-case name for table element-->
<tr>
<xsl:apply-templates select="*[@aid:theader='']">
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</tr>
<!-- and @aid:style=$cellStyle -->
<xsl:for-each
select="*[@aid:table='cell'][not(@aid:theader='')][position() mod $cellsPerRow = 1]">
<!-- some code adapted with permission, from http://www.computorcompanion.com/LPMArticle.asp?ID=202
Building HTML Tables with XSL by James Byrd; please include this acknowledgement in all files that use his code -->
<!-- this is the tricky bit of the code that James Byrd set up
p-class-tabletext-[position() mod $cellsPerRow = 1 continues looping until the position of the active element divided by $cellperRow (@aid:tcols value) tried with [@aid:style=$cellStyle] has a remainder of 1 -->
<!-- .|following-sibling::p-class-tabletext-[position() < $cellsPerRow] applies first to the currently selects cell with "." then continues with the following-siblings whose position is less than the value of cells per row (@aid:tcols value) -->
<tr>
<xsl:apply-templates
select=".|following-sibling::*[@aid:table='cell'][not(@aid:theader='')][position() < $cellsPerRow]"
/>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="*">
<xsl:param name="colheadStyle">
<xsl:value-of select="$colheadStyle"/>
</xsl:param>
<xsl:param name="cellStyle">
<xsl:value-of select="$cellStyle"/>
</xsl:param>
<xsl:variable name="cellsPerRow">
<xsl:value-of select="parent::Table/@aid:tcols"/>
</xsl:variable>
<xsl:choose>
<!-- colHead aid:table="cell" aid:theader=""-->
<xsl:when test="parent::Table and @aid:theader">
<th>
<xsl:apply-templates>
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</th>
<xsl:if test="(position() = last()) and (position() < $cellsPerRow)">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
</xsl:call-template>
</xsl:if>
</xsl:when>
<xsl:when test="parent::Table and @aid:table='cell' and not(@aid:theader)">
<td>
<xsl:apply-templates>
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</td>
<xsl:if test="(position() = last()) and (position() < $cellsPerRow)">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
</xsl:call-template>
</xsl:if>
</xsl:when>
<!-- for non-table elements this generic element handler will pick up an aid:pstyle (if present) and create a class attribute from it. Works for any element that has the same name as HTML element such as <p> but it doesn't add wrapper elements like <ul> or <ol> for lists. -->
<xsl:otherwise>
<xsl:element name="{name()}">
<xsl:if test="@aid:pstyle">
<xsl:attribute name="class">
<xsl:value-of select="@aid:ptyle"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates>
<xsl:with-param name="colheadStyle" select="$colheadStyle"/>
<xsl:with-param name="cellStyle" select="$cellStyle"/>
</xsl:apply-templates>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- take care of text that is a direct child of the <Story> by wrapping it in a <p> to make valid HTML -->
<xsl:template match="text()">
<xsl:variable name="myString">
<xsl:value-of select="string-length(normalize-space(.))"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="parent::Story">
<xsl:if test="$myString > 0">
<xsl:element name="p">
<xsl:attribute name="class">text</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</xsl:element>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(.)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- make br element conform to good HTML markup -->
<xsl:template match="br">
<br />
</xsl:template>
<!-- this recursive template calls itself until its test condition is satified -->
<!-- it outputs a cell whose only content is a non-breaking space -->
<!-- do not use in place of Unicode   for the non-breaking space -->
<!-- the value of $cellCount is set in the main XSL template -->
<xsl:template name="FillerCells">
<xsl:param name="cellCount"/>
<td> </td>
<xsl:if test="$cellCount > 1">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellCount - 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Message was edited by: HoneoyeFalls
Sample XML file exported from IDD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Story><Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="2" aid:tcols="2"><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 colHead</colHead><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 colHead</colHead><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">row 2 1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">row 2 2 tabletext</tabletext></Table>
<table><tr><th>normal HTML table heading</th></tr>
<tr><td>normal HTML table<br/>cell text</td></tr></table></Story>You can use RECORD type declaration:
SQL> declare
2 type rec_type is record (
3 ename emp.ename%type,
4 sal emp.sal%type
5 );
6 type rc is ref cursor return rec_type;
7 rc1 rc;
8 rec1 rec_type;
9 begin
10 open rc1 for select ename, sal from emp;
11 loop
12 fetch rc1 into rec1;
13 exit when rc1%notfound;
14 dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
15 end loop;
16 close rc1;
17 end;
18 /
SMITH 800
ALLEN 1600
WARD 1250
JONES 2975
MARTIN 1250
BLAKE 2850
CLARK 2450
SCOTT 3000
KING 5000
TURNER 1500
ADAMS 1100
JAMES 950
FORD 3000
MILLER 1300or use, for example, VIEW to declare rowtype:
SQL> create view dummy_view as select ename, sal from emp;
View created.
SQL> declare
2 type rc is ref cursor return dummy_view%rowtype;
3 rc1 rc;
4 rec1 dummy_view%rowtype;
5 begin
6 open rc1 for select ename, sal from emp;
7 loop
8 fetch rc1 into rec1;
9 exit when rc1%notfound;
10 dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
11 end loop;
12 close rc1;
13 end;
14 /
SMITH 800
ALLEN 1600
WARD 1250
JONES 2975
MARTIN 1250
BLAKE 2850
CLARK 2450
SCOTT 3000
KING 5000
TURNER 1500
ADAMS 1100
JAMES 950
FORD 3000
MILLER 1300 Rgds. -
Creating xml format file with double dagger ‡ as delimiter
Hi,
My source files are delimited with double dagger (‡) and I am using openrowset to load the files to SQL Server. When I am creating the format file by specifying the delimiter as ‡, the format file created has a different delimiter than the specified one.
The new delimiter appearing in xml format file is ç.
Any help?
TIA
Nitesh Rai- Please mark the post as answered if it answers your questionHow did you create format file?
Try this method and see if it works
http://visakhm.blogspot.com/2013/10/generate-format-files-based-on-table.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Hello all,
I'm stuck at an output file, so I have my program generated the output file, I have everything in internal table itab. But I need to generate the output file in xml format. My question is do you know any function module doing the job? like export import everything from my internal table and create an xml file? Or that's something I have to hardcode in my program?
Any helpful idea will be highly appreciated. Thanks!In the Class CL_XML_DOCUMENT, we have a method EXPORT_TO_FILE to download an XML file.
DATA: l_subrc TYPE sysubrc,
l_lfile TYPE localfile,
l_file TYPE string,
l_title TYPE string,
l_path TYPE string,
l_fullpath TYPE string.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = l_title
default_extension = 'XML'
file_filter = 'XML'
CHANGING
filename = l_file
path = l_path
fullpath = l_fullpath
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
l_lfile = l_fullpath.
CALL METHOD l_xml->export_to_file
EXPORTING
filename = l_lfile
RECEIVING
retcode = l_subrc.
ENDIF.
Raja -
I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button. When the button is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format. Is there a quick fix?
Hi,
You have the choice between xml or pdf, in later versions of designer you can choose with a dropdown on the email button Object palette, the "Submit As";
In earlier version you had to edit the XML Source and change the format from xml to pdf (or vice-versa);
Regards
Bruce -
Hi All,
I have a string field that is formatted in XML format. What I want to be able to do is pull a specific element from the xml formatted string.
Example string:
<customer><name>john</name><id>25636</id></customer>
I want to retreive just the id number of 25636 from this string.
I would I go about accomplishing this?
Thank you in advance,I fixed it on my own.
Here' s my answer for others that may need it:
if(instr({field.xmlstring},'</id>') - instr({field.xmlstring},'<id>') = 7)then
mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,3)
else if(instr({field.xmlstring},'</id>') - instr({field.xmlstring},'<id>') = 8)then
mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,4)
else if(instr({field.xmlstring},'</id>') - instr({field.xmlstring},'<id>') = 9)then
mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,5)
I use the conditions to cover all possible lengths of the id number. -
Generate HTML from XML and XSLT
Hi,
I have asked in different forum but did not get my answer so asking here again
i want to generate a HTML file from XML and XSLT in a temp folder and then read it into a java.lang.String, so can email it or write to a database file.
how can i do it, is there any engine which will merger XML and XSLT and give a HTML file or a String as output
AshishHi,
Follow the simple steps.
1) Create XML Document (I hope u have it)
2) Create XSL Stylesheet for your XML document
3) Put both files in one directory some where in your local system or web server upto u
4) Invoke the XML document from webbrowser and you are done.
http://localhost/test/Catalog.xml OR C:\XXXXDIR\test\Catalog.xml
For Ex: XML File Content, Catalog.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="Catalog.xsl"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
</catalog>
XSL File Content: Catalog.xsl
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Title</th>
<th align="left">Artist</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template></xsl:stylesheet> -
Swift Adapter for bea8.1 Error in parsing swift format to xml
hi All,
I need your help, how to parse swift format to xml format. Suppose I took one example of swift Message Type, that was MT103
To convert this message I have tried all of these methods:
wlai.swiftMT103EventMT103Event.SWIFTMT103Document.Factory.parse(File)
wlai.swiftMT103EventMT103Event.SWIFTMT103Document.Factory.parse(String)
wlai.swiftMT103ServiceMT103Request.SWIFTMT103Document.Factory.parse(File)
wlai.swiftMT103ServiceMT103Request.SWIFTMT103Document.Factory.parse(String)
But I still found the error
com.bea.xml.XmlException : Unexpected element :CDATA
while these methods were executed.
so anyone can help me how to transform swift format to xml format..?..
The final purpose of my transformation is transforming swift format to mainframe format..
so anyone has the clue how to do that..?
Thanks,
JunedHello
I've solved the problem.
In the stack.xml file are multiples software-components with the same name, here "SERVERCORE".
I had 3 entries, two with patch-level 0 and one with patch-level 1.
I've deleted the two entries with patch-level 0 and then it works.
Regards Christian -
How can i dynamically generate an xslt based an XML?
i have an XML file,i've designed the displaying style.
now,i wanna generate an xslt file from XML files that have different nodeNames.
what to do?
is there any JAVA API who can implement the idea?
thanks to whom giving any hint:)ooooh, I see!
you can achieve this with one single universal XSL:<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="text"/>
<xsl:template match="query">
<xsl:apply-templates select="result[1]/@*" mode="heading"/>
<xsl:text disable-output-escaping="yes"> </xsl:text>
<xsl:apply-templates select="result" mode="value"/>
</xsl:template>
<xsl:template match="@*" mode="heading">
<xsl:value-of select="local-name(.)"/>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="result" mode="value">
<xsl:apply-templates select="@*" mode="value"/>
<xsl:text disable-output-escaping="yes"> </xsl:text>
</xsl:template>
<xsl:template match="@*" mode="value">
<xsl:value-of select="."/>
<xsl:text> </xsl:text>
</xsl:template>
</xsl:stylesheet>fun stuff, nope?
Maybe you are looking for
-
Whenever i try to open a video it starts quicktime but can't open the actual window
It's only started happening recently but If i try to open a video, .mp4 for example, it opens quicktime and its shown on the dock and on the top bar but it doesn't actually open the window to play the thing. It just opens the app, nothing else. Does
-
"This app cannot be downloaded at this time" problems
I Have a iPhone 4S version 7.0.3 and for the past week I've been unable to download or update any of my apps. I've been searching these forums and nothing I've seen has worked. I've turned it on and off I've reset all my settings I've signed in an ou
-
Internet trouble using Macbook and Airport extreme
I have a new Macbook and an older airport extreme base station. I'm trying to access the internet with a dial-up connection, however, after the base station dials the number it gets hung up on "connecting to your ISP" and I can't surf the net. I've c
-
Once I updated to the latest version of Premiere 2014.2 I started experiencing a glitch when my cuts would slip a frame or two. At first it was randomly. Then I had footage I was using that was an .avi file that I converted to .m4v using vlc and now
-
Unchecking radio buttons in fillable PDF
I want those checking check box to have the ability to uncheck a box (or radio button). For instance, if there's a question that says, "If you checked "yes" to 8a above, skip question 8b," but someone accidentally checks the radio button in 8b, how d