What is an XML PARSER?
What is an XML Parser?
what is it's use?
XI is middleware tool to send data from one location to another Basically a middleware tool.
and the data that XI send has some structre like
firstname:XYZ
Middlaename:ABX
lastname:PQR
All this data is represent as XML ( A way to store the data with tag here it is firstname last name
So XI uses XLL parser to parse this data
After parsing XI will come to know what is first name what is last name
So actually dat is represent as below in XML
<firstname>XYZ</firstname>
<Middlaename>ABX</Middlaename>
<lastnamePQR</lastname>
Above is the defination of data that XI is going to send
But in case data is wrong like
<Middlaename>ABX</Middlaename>
<firstname>XYZ</firstname>
<lastnamePQR</lastname>
Note Here ABX is first line
and this data is wrong
XI will find this wrong data with help of XML parser which has correct defination of the data
in case data is wrong parser will give error that data is wrong
Ps: If helful please give point
Similar Messages
-
What is a (xml parsing error:not well-formed) and how to fix this
what is a (xml parsing error:not well-formed) and how to fix this
== URL of affected sites ==
http://sudburyfinecars.subarudealer.ca
== Troubleshooting information ==
XML Parsing Error: not well-formed
Location: http://sudburyfinecars.subarudealer.ca/WebPage.aspx?WebSiteID=205
Line Number 258, Column 152:I found the solution to my own problem by using Internet Explorer instead of Firefox, it turn out that the site i was trying to get into is an old site using proxy servers that Firefox doesn't read properly giving me the XML parsing error:not well-formed.
Its not Firefox's fault its just letting you know that this could be a problem site if it lets you in. -
XML parsing more than 1 GB size
Hi,
After I've gone through many sites regarding parsing XML file more than 1 GB in java, i've understood that StAX can be useful for this parsing. My question is now, can we do parallel xml parsing through StAX?
If yes, pls provide me the code snippet or approach.
Appreciated for quick responses.
rays9 -->What is "parallel XML parsing"?
-
I have Dreamweaver CS5.5 and all of a sudden I can't open it says XML parsing fatel error. Invalid Document Structure What do I do? Thanks
You need to rename the Configuration folder to Configuration_BU.
The folder can be found by following this http://www.dmxzone.com/go/16740/clearing-dreamweaver-s-cache/ -
Hello, looking to see if there's anyone out there who knows how to resolve this error from popping up when I open a previously saved adobe file with data populated inside (tax form).
The error states:
XML Parsing error: not well-formed (invalid token) (error code 4), line 16028, column 2 of file.
So when I go to open this file, THAT ERROR appears. But then allows me to view the content inside the PDF (tax form) - however it will not allow further editing - this is an issue.
This began after working and populating certain files, then transferring to a hosting site. Now when I open any PDF file from the hosting site, the error appears. Could just be coincidental however throwing that out there in case it's useful.
What causes this error & what is the fix?
Cheers!Unfortunately No. This was a tax form downloaded from IRS.gov. The PDF file has been populated and saved off. I believe the file has somehow become corrupt. Curious how to cleanse the file so it opens without issue (that error message).
Thanks for your response -
What`s going on with XML Parser version 2.0.2.7?
Hi,
In january, I was told on this forum by Steven Muench to wait version 2.0.2.7 of Oracle XML Parser to correct a textarea bug with <xsl:output method="HTML"... I would like to know what's going on and when should I expect this new version be available to download.
Thanks!It's in testing right now. Will likely still be a couple more weeks before it's out on OTN.
-
What is the best api for xml parsing?
I think that api comes with j2se is not that good for xml parsing. is there any open source api which is simple,easy and powerful,
JArsenic wrote:
Hey I feel XMLBeans would be a optimal solution for XML parsing as I provides you a whole set of methods to parse your XML tags as Java Objects. And you may download XMLBeans @ http://xmlbeans.apache.org/.
What advantage would that have over JAXB? It already can do all that and is built into Java itself, so you don't need a separate download.
Also: mapping XML to Java beans is a very specific way of handling XML and is definitely not "the best" in all situations.
For similar quest you may reach @ [somesite]Please, no advertisement here, read the Code of Conduct that you agreed on singing up with this page. -
What is the meaning of main and stream factory in XML parsing?
What is the exact meaning (i.e. concept) of main and stream factory in XML parsing?
[I am aware of steps involved in XML parsing using iXML library..|http://help.sap.com/saphelp_nw04/helpdata/en/86/8280cf12d511d5991b00508b6b8b11/content.htm], so pls dont explain these steps again.. I have been searching in internet for concepts of these factories, but could not get them anywhere..Tipos Pools
TYPE-POOLS: ixml.
CLASS cl_ixml DEFINITION LOAD.
TYPES: BEGIN OF xml_node_type,
node TYPE char50,
vlnode TYPE string,
END OF xml_node_type,
BEGIN OF xml_line_type,
data(256) TYPE x,
END OF xml_line_type.
Tabelas Internas
DATA: ti_xml_node TYPE TABLE OF xml_node_type.
Variáveis TYPE REF
*Type REF para utilizar no XML
DATA: ixml_type TYPE REF TO if_ixml,
streamfactory_type TYPE REF TO if_ixml_stream_factory,
ostream_type TYPE REF TO if_ixml_ostream,
istream_type TYPE REF TO if_ixml_istream,
parser_type TYPE REF TO if_ixml_parser,
renderer_type TYPE REF TO if_ixml_renderer,
document_type TYPE REF TO if_ixml_document,
encoding_type TYPE REF TO if_ixml_encoding,
node_type TYPE REF TO if_ixml_node,
element_dtrans_type TYPE REF TO if_ixml_element,
element_xml_in_type TYPE REF TO if_ixml_element,
element_roteiros_type TYPE REF TO if_ixml_element,
element_roteiro_type TYPE REF TO if_ixml_element,
element_vias_type TYPE REF TO if_ixml_element,
element_via_type TYPE REF TO if_ixml_element,
element_dummy_type TYPE REF TO if_ixml_element,
gw_xml_node TYPE TABLE OF xml_node_type,
gw_xml_node_ret TYPE TABLE OF xml_node_type,
gw_xml_node_err TYPE TABLE OF xml_node_type,
gw_xml_node_xml TYPE TABLE OF xml_node_type,
gw_xml_table TYPE TABLE OF xml_line_type,
gw_xml_table2 TYPE TABLE OF xml_line_type,
gs_xml_node TYPE xml_node_type, "WA para leitura do xml
gs_xml_node_ret TYPE xml_node_type, "WA para leitura do xml retorno
gs_xml_node_err TYPE xml_node_type, "WA para leitura do xml erro
gs_xml_node_xml TYPE xml_node_type, "WA para leitura do xml info sucesso
gs_xml_table2 TYPE xml_line_type. "WA para importar xml
Variáveis do Programa
DATA: l_value TYPE string,
l_rc TYPE i,
l_xml_size TYPE i,
cod_cartaorepom TYPE char20 VALUE '123456789',
v_caminho_exp TYPE string VALUE 'C:TEMP',
v_salvaarquivo TYPE string,
v_nomearquivo TYPE string,
w_nodetext TYPE string,
v_roteiros TYPE string,
v_roteiro TYPE string,
v_roteiro_codigo TYPE string,
v_percurso_codigo TYPE string,
v_percurso_descricao TYPE string,
v_cidade_origem TYPE string,
v_estado_origem TYPE string,
v_cidade_destino TYPE string,
v_estado_destino TYPE string,
v_transporte_tipo TYPE string,
v_cartao_taxa TYPE string,
v_cobra_taxa TYPE string.
Constants
CONSTANTS: cc_39 TYPE string VALUE '39', " Numero 39.
cc_dt_trans TYPE string VALUE 'data_transfer'," document_type(name)
cc_metodo_cod TYPE string VALUE 'metodo_codigo'," document_type(name)
cc_xml_in TYPE string VALUE 'xml_in'," document_type(name)
cc_ct_tx_ativ TYPE string VALUE 'cartao_taxa_ativacao'," document_type(name)
cc_cartao TYPE string VALUE 'cartao', " Parâmetro Perform.
cc_xml TYPE string VALUE '.XML'," extenção
cc_bin TYPE char10 VALUE 'BIN'." filetype
START-OF-SELECTION.
PERFORM yf_inicia_criacao_xml USING cc_39.
element_roteiro_type = document_type->create_simple_element(
name = cc_ct_tx_ativ
parent = element_xml_in_type ).
PERFORM yf_dummy_roteiro USING cod_cartaorepom cc_cartao.
PERFORM yf_finaliza_xml.
PERFORM yf_exporta_xml USING v_caminho_exp.
PERFORM yf_convert_xml_to_itab TABLES gw_xml_node_ret
USING v_salvaarquivo.
END-OF-SELECTION.
*& Form yf_inicia_criacao_xml
text
-->VALUE(P_0783) text
FORM yf_inicia_criacao_xml USING value(p_0783).
DATA: s_encoding_type TYPE string VALUE 'ISO-8859-1'.
Cria o ixml factory
ixml_type = cl_ixml=>create( ).
*Cria o objeto com modelo
document_type = ixml_type->create_document( ).
*Cria o cabeçalho encoding="iso-8859-1"
encoding_type = ixml_type->create_encoding( byte_order = 0
character_set = s_encoding_type ).
*Cria o root "DATA_TRANSFER"
element_dtrans_type = document_type->create_simple_element(
name = cc_dt_trans
parent = document_type ).
*Cria o node "METODO_CODIGO" e preenche com um valor passado no L_VALUE
l_value = p_0783.
CONDENSE l_value.
element_dummy_type = document_type->create_simple_element(
name = cc_metodo_cod
value = l_value
parent = element_dtrans_type ).
*Cria o node "XML_IN"
element_xml_in_type = document_type->create_simple_element(
name = cc_xml_in
parent = element_dtrans_type ).
ENDFORM. " yf_inicia_criacao_xml
*& Form yf_dummy_roteiro
text
-->VALUE(P_0996) text
-->VALUE(P_0997) text
FORM yf_dummy_roteiro USING value(p_0996)
value(p_0997).
l_value = p_0996.
CONDENSE l_value.
element_dummy_type = document_type->create_simple_element(
name = p_0997
value = l_value
parent = element_roteiro_type ).
ENDFORM. " yf_dummy_roteiro
*& Form yf_finaliza_xml
text
FORM yf_finaliza_xml.
*Cria o stream factory
streamfactory_type = ixml_type->create_stream_factory( ).
*Conecta a internal table de XML com o stream factory
ostream_type = streamfactory_type->create_ostream_itable( table = gw_xml_table ).
CALL METHOD ostream_type->set_encoding
EXPORTING
encoding = encoding_type.
*Rendering the document
renderer_type = ixml_type->create_renderer( ostream = ostream_type
document = document_type ).
l_rc = renderer_type->render( ).
*Salva o documento XML
l_xml_size = ostream_type->get_num_written_raw( ).
ENDFORM. " yf_finaliza_xml
*& Form yf_exporta_xml
text
-->VALUE(P_0783) text
FORM yf_exporta_xml USING value(p_0783).
CONCATENATE cod_cartaorepom
sy-datum
sy-uzeit
cc_xml
INTO v_nomearquivo.
CONCATENATE p_0783
v_nomearquivo
INTO v_salvaarquivo.
TRANSLATE v_nomearquivo TO UPPER CASE.
*Exporta o XML
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_xml_size
filename = v_salvaarquivo
filetype = cc_bin
CHANGING
data_tab = gw_xml_table
EXCEPTIONS
OTHERS = 24.
IF sy-subrc = 0.
PERFORM yf_sapgui_progress_indicator USING cc_msg_xml_ok.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " yf_exporta_xml
*& Form yf_convert_xml_to_itab
text
-->P_GW_XML_NODE_RET text
-->P_FILENAME text
FORM yf_convert_xml_to_itab TABLES p_gw_xml_node_ret LIKE gw_xml_node
USING p_filename.
DATA l_count.
ixml_type = cl_ixml=>create( ).
Now Create Stream Factory
streamfactory_type = ixml_type->create_stream_factory( ).
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = p_filename
filetype = cc_bin
IMPORTING
filelength = l_xml_size
CHANGING
data_tab = gw_xml_table2
EXCEPTIONS
OTHERS = 19.
IF sy-subrc = 0.
istream_type = streamfactory_type->create_istream_itable( table = gw_xml_table2
size = l_xml_size ).
document_type = ixml_type->create_document( ).
parser_type = ixml_type->create_parser( stream_factory = streamfactory_type
istream = istream_type
document = document_type ).
IF parser_type->parse( ) NE 0.
IF parser_type->num_errors( ) NE 0.
l_count = parser_type->num_errors( ).
ENDIF.
ENDIF.
CALL METHOD istream_type->close( ).
CLEAR istream_type.
node_type = document_type.
PERFORM yf_get_data USING node_type.
p_gw_xml_node_ret[] = gw_xml_node[].
CLEAR gw_xml_node[].
ENDIF.
ENDFORM. " yf_convert_xml_to_itab
*& Form yf_get_data
text
-->VALUE(X_NODE) text
FORM yf_get_data USING value(x_node) TYPE REF TO if_ixml_node.
DATA: indent TYPE i.
DATA: ptext TYPE REF TO if_ixml_text.
DATA: string TYPE string.
DATA: temp_string(100).
CASE x_node->get_type( ).
WHEN if_ixml_node=>co_node_element.
string = x_node->get_name( ).
w_nodetext = string.
CLEAR string.
string = x_node->get_value( ).
IF NOT w_nodetext IS INITIAL OR
NOT string IS INITIAL.
gs_xml_node-node = w_nodetext.
gs_xml_node-vlnode = string.
IF NOT gs_xml_node-vlnode IS INITIAL.
APPEND gs_xml_node TO gw_xml_node.
CLEAR gs_xml_node.
ENDIF.
ENDIF.
ENDCASE.
Get the next child
x_node = x_node->get_first_child( ).
Recurse
WHILE NOT x_node IS INITIAL.
PERFORM yf_get_data USING x_node.
x_node = x_node->get_next( ).
ENDWHILE.
ENDFORM. "yf_get_data -
What Oracle version for XML Parser for java
Is the XML Parser for Java only available for use with
Oracle 8i? Is it possible to use with Oracle 8.05
nullThe XML Parser for Java can be used with any of the supported
version JavaVMs. The only difference with 8i is that you can
load it into the database and use JServer which is an internal
VM. For 8.0.5 you simple run it externally and connect through
JDBC.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Eddie SHipman (guest) wrote:
: Is the XML Parser for Java only available for use with
: Oracle 8i? Is it possible to use with Oracle 8.05
null -
What's the best XML parser for J2ME
Hello,
has anybody a suggestione about a light and (hopefully) performant opern source XML parser library to use in a J2ME application?
I'm going to explore Xparse-J and Kxml: Is there anything better?
Thank you,
AndreakXML is the most important and popularly use XML parser for KVM. This is a combination of pull parser and the XMLWriter. It coantains a WAP Binary XML and a special kDOM.
NanoXML is another parser for KVM, which works on push-parsing technology. Now it is not very popular. -
Help Me what is the "Parse Error: com.sun.xml.parser/P-067"?
OS: Window 2000 (it will be changed HP-UX 11)
Web Server: iPlanet 4.1 SP14
DB Server : Oracle 8i
JDK: 1.2.2_017
Tag Library : jakarta-taglibs-dbtags-1.0.0 (http://jakarta.apache.org/taglibs/doc/dbtags-doc/intro.html)
DTD file: web-jsptaglib_1_1.dtd ( actually, jakarta used http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd, but that dosen't work in iPlanet 4.1 SP 14. so i changed the path of dtd location to web-jsptaglib_1_1.dtd like the following tld file.)
How should I use Jakarta DB Tag Library in iPlanet 4.1 SP? I'm very tired to set all of thses stupid things!
I can't use Tag Library in iPlanet 4.1 SP 14
Any comments make me happy~!
Please, help me~!
■ Error Message
[15/3/2005:20:21:41] info ( 4552): Internal Info: loading servlet /test/jdbc5.jsp
[15/3/2005:20:21:42] info ( 4552): JSP: JSP1x compiler threw exception
org.apache.jasper.JasperException: Unable to open taglibrary http://localhost/tlds/dbtags5.jar : Parse Error in the tag library descriptor: com.sun.xml.parser/P-067
at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java, Compiled Code)
at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:119)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1022)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1018)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled Code)
at com.netscape.server.http.servlet.NSServletEntity.load(NSServletEntity.java:231)
at com.netscape.server.http.servlet.NSServletEntity.update(NSServletEntity.java:149)
at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:453)
■ TLD File
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://localhost/dtd/web-jsptaglib_1_1.dtd">
<!-- a tab library descriptor -->
<!-- "http://java.sun.com/j2ee/dtds/jsptaglibrary_1_2.dtd" -->
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<prefix>DBTag</prefix>
<urn></urn>
<info>
A simple db tab library for the examples
</info>
<tag>
<name>connection</name>
<tagclass>org.apache.taglibs.dbtags.connection.ConnectionTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.connection.ConnectionTEI</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>dataSource</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>jndiName</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>url</name>
<tagclass>org.apache.taglibs.dbtags.connection.DatabaseURLTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>initParameter</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>jndiName</name>
<tagclass>org.apache.taglibs.dbtags.connection.JndiNameTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>initParameter</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>driver</name>
<tagclass>org.apache.taglibs.dbtags.connection.DriverTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>initParameter</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>userId</name>
<tagclass>org.apache.taglibs.dbtags.connection.UserIdTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>initParameter</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>password</name>
<tagclass>org.apache.taglibs.dbtags.connection.PasswordTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>initParameter</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>closeConnection</name>
<tagclass>org.apache.taglibs.dbtags.connection.CloseConnectionTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>conn</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>statement</name>
<tagclass>org.apache.taglibs.dbtags.statement.StatementImplTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.statement.StatementTEI</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>conn</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>escapeSql</name>
<tagclass>org.apache.taglibs.dbtags.statement.EscapeSQLTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>query</name>
<tagclass>org.apache.taglibs.dbtags.statement.QueryTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>execute</name>
<tagclass>org.apache.taglibs.dbtags.statement.ExecuteTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>ignoreErrors</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
</tag>
<tag>
<name>preparedStatement</name>
<tagclass>org.apache.taglibs.dbtags.preparedstatement.PreparedStatementImplTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.preparedstatement.PreparedStatementTEI</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>conn</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>setColumn</name>
<tagclass>org.apache.taglibs.dbtags.preparedstatement.SetColumnTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>position</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>resultSet</name>
<tagclass>org.apache.taglibs.dbtags.resultset.ResultSetTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.resultset.ResultSetTEI</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>loop</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>wasNull</name>
<tagclass>org.apache.taglibs.dbtags.resultset.WasNullTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>wasNotNull</name>
<tagclass>org.apache.taglibs.dbtags.resultset.WasNotNullTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>getColumn</name>
<tagclass>org.apache.taglibs.dbtags.resultset.GetColumnTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.resultset.BaseGetterTEI</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>position</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>colName</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>to</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
</tag>
<tag>
<name>getNumber</name>
<tagclass>org.apache.taglibs.dbtags.resultset.GetNumberTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.resultset.BaseGetterTEI</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>position</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>colName</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>to</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>locale</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
<attribute>
<name>format</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
</tag>
<tag>
<name>getTime</name>
<tagclass>org.apache.taglibs.dbtags.resultset.GetTimeTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.resultset.BaseGetterTEI</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>position</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>colName</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>to</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>locale</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
<attribute>
<name>format</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
</tag>
<tag>
<name>getTimestamp</name>
<tagclass>org.apache.taglibs.dbtags.resultset.GetTimestampTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.resultset.BaseGetterTEI</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>position</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>colName</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>to</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>locale</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
<attribute>
<name>format</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
</tag>
<tag>
<name>getDate</name>
<tagclass>org.apache.taglibs.dbtags.resultset.GetDateTag</tagclass>
<teiclass>org.apache.taglibs.dbtags.resultset.BaseGetterTEI</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>position</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>colName</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>to</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
</attribute>
<attribute>
<name>locale</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
<attribute>
<name>format</name>
<required>no</required>
<rtexprvalue>yes</rtexprvalue>
</attribute>
</tag>
<tag>
<name>wasEmpty</name>
<tagclass>org.apache.taglibs.dbtags.resultset.WasEmptyTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>wasNotEmpty</name>
<tagclass>org.apache.taglibs.dbtags.resultset.WasNotEmptyTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>rowCount</name>
<tagclass>org.apache.taglibs.dbtags.resultset.RowCountTag</tagclass>
<bodycontent>empty</bodycontent>
</tag>
</taglib>Googling I get this....
P-067 = Document root element is missing. -
XML Parse error while loading an XML file
HI Folks,
I was trying to load and XML file into BODS.. The XML file is well-formed and the same when tested in other tools is getting loaded without any issues..
I have created a XML-File format with the corresponding XSD..
But here in BODS it is giving - Parse error
1) when i try to view the data of the source XML in my dataflow ..it is giving "XML Parser Failed".. and not able to show data..
2) When I run my job i get the same pares error - with details as under..
---> Error here is "Unable to recognize element 'TAB' " or some time is say " Element TAB should be qualified"
Please guide with this if you have any info..thanks
I'm pasting the XML source file format here for your reference:--
<?xml version="1.0" encoding="iso-8859-1" ?>
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
- <asx:values>
- <TAB>
- <items>
+ <CUSTOMER_RECORD>
<CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
<NAME_1>ABC</NAME_1>
<NAME_2>OFM/COMMERCIAL ACCOUNTS</NAME_2>
<STREET_1>31 CENTER DRIVE MCS2045</STREET_1>
<STREET_2 />
<CITY>BETHESDA</CITY>
<STATE_CODE>MD</STATE_CODE>
<POSTAL_CODE>20892-2045</POSTAL_CODE>
<COUNTRY_CODE>US</COUNTRY_CODE>
<ORDER_BLOCK />
<ERP_CREATE_DATE>20040610</ERP_CREATE_DATE>
<ERP_CREATED_BY>DGUPTA</ERP_CREATED_BY>
<ERP_MODIFY_DATE>20120201</ERP_MODIFY_DATE>
<ERP_MODIFIED_BY>LWOHLFEI</ERP_MODIFIED_BY>
<INDUSTRY_CODE>0103</INDUSTRY_CODE>
<ACCOUNT_GROUP_ID>0001</ACCOUNT_GROUP_ID>
<SALES_NOTE />
<ADDRESS_NOTE />
<CUSTOMER_CLASSIFICATION_CODE>02</CUSTOMER_CLASSIFICATION_CODE>
<GLN_NUMBER />
<PREVIOUS_ACCT_NO />
<ACCOUNT_TYPE />
<GAG />
<SDI_ID />
<HOSP_ID />
<HIN />
<DUNS />
<PO_BOX />
<POB_CITY />
<POB_ZIP />
<PHONE_NUMBER>77777</PHONE_NUMBER>
<EMAIL_DOMAIN />
<REQUESTER />
<ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
</CUSTOMER_RECORD>
- <SALES_ORG_DATA>
+ <item>
<CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
<SALES_ORG>0130</SALES_ORG>
<CUSTOMER_GROUP>03</CUSTOMER_GROUP>
<ORDER_BLOCK_CODE />
<ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
</item>
+ <item>
<CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
<SALES_ORG>0120</SALES_ORG>
<CUSTOMER_GROUP>11</CUSTOMER_GROUP>
<ORDER_BLOCK_CODE />
<ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
</item>
</SALES_ORG_DATA>
</items>
</TAB>
</asx:values>
</asx:abap>Pierre,
Depending on the object "myLastFile", the method openDlg might not even exist (if the myLastFile object is not a File object, for instance). And I do not see any need for the myLastFile anyhow, as you are presenting a dialog to select a file to open. I recommend using the global ChooseFile( ) method instead. This will give you a filename as string in full path notation, or null when no file was selected in the dialog. I am not sure what your ExtendScript documentation states about the return value for ChooseFile, but if that differs from what I am telling you here, the documentation is wrong. So, if you replace the first lines of your code with the following it should work:
function openXMLFile ( ) {
var filename = ChooseFile ( "Choose XML file ...", "", "*.xml", Constants.FV_ChooseSelect );
While writing this, I see that Russ has already given you the same advice. Use the symbolic constant value I indicated to use the ChooseFile dialog to select a single file (it can also be used to select a directory or open a file - but you want to control the opening process yourself). Note that this method allows you to set a start directory for the dialog (second parameter). The ESTK autocompletion also gives you a fifth parameter "helplink" which is undocumented and can safely be ignored.
Good luck
Jang -
HOW TO: Use the XML parser in Oracle 8.1.7
I am trying to figure out how to use the xml parser provided in oracle 8.1.7. all i want to do is parse a xml report that is defined using a schema, and place the data into the proper tables. i am totally unfamiliar with the xml parser and how it works. i have done some reading on the subject, but seem to be getting some conflicting infromation about which utilites i need and how to invoke them. can someone please tell me what utilities i need, how to invoke them, and what i need to do to get a xml document to parse and insert to a table? I would greatly appreciate any help anybody could offer. thanks.
You can parse the XML Document with XML Parser and place the data into database using XSU(XML SQL Utility).
Both of these are included in XDK for Java at:
http://otn.oracle.com/tech/xml/xdk_java
The following document could also help:
Oracle9i XML Developer's Guide--XDK [PDF] at http://otn.oracle.com/tech/xml/doc.html -
XML Parsing error in PL/SQL
Hello,
I have some problem in parsing Mircrosoft OpenXML file using Oracle 10g Release2 XML Parser for PL/SQL.
I use dbms_xmlparser, dbms_xmldom, dbms_xslprocessor packages
OpenXML file use "w:" as namespace, so every element has prefix "w:" like
<w:wordDocument ..>
<w:body..>
<w:p..>
<w:r..>
<w:t..>
My job is to read OpenXML file inside PL/SQL code, parse it, and load it into the corresponding table.
Here is my PL/SQL code.
DECLARE
doc dbms_xmldom.DOMDocument;
node_list dbms_xmldom.DOMNodeList;
l_node dbms_xmldom.DOMNode;
one_element dbms_xmldom.DOMElement;
PROCEDURE p (msg VARCHAR2, nl BOOLEAN := TRUE) IS
BEGIN
dbms_output.put_line (msg);
IF nl THEN dbms_output.put(CHR(10)); END IF;
END:
BEGIN
doc := xml.parse(BFileName('XML_DIR','OpenXMLFile.xml'));
node_list := xpath.selectNodes(doc, '/w:wordDocument/w:body/w:p/w:r/w:t');
FOR j IN 0..dbms_xmldom.getLength(node_list)-1
LOOP
p( xpath.valueOf(dbms_xmldom.item(node_list, j), '.'), nl=>FALSE );
END LOOP;
Here is the error message.
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '/w:wordDocument/w:body/w:p/w:r/w:t
[starts-with(., "!")]'
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 900
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 928
ORA-06512: at "SYSTEM.XPATH", line 173
ORA-06512: at "SYSTEM.XPATH", line 179
ORA-06512: at line 38
I really don't know why I got this error message nor how to solve it. If I remove "w:" manually within open xml file, then parsing works well. I guess XML parser for PL/SQL doesn't recognize ":" or maybe doesn't support namespace?
My question is
1. In oracle 10g release2, XML Parser for PL/SQL can recognize ":" in the element name? or does it support namespace? If not, is there any workaround for solving this problem?
2. How can I make XML Parser recognize ":" in the element name in the xml file or How can I declare namespace in the PL/SQL code so that PL/SQL xml parser can recognize namespace like "w:"?
In fact, I don't use XML DB and what I want to do is just to load XML file into the relational table and some parts of whole XML file will be inserted into the CLOB in the table.
Should I really use XML DB to do the above job?
Any comment or suggestions will be greatly appreciated.This works correctly. I added prefixes to your extract path. (I had to add the xmlns:xsi to your root node also.)
declare
-- Local variables here
doc_in dbms_xmldom.DOMDocument;
aNodeList dbms_xmldom.DOMNodeList;
begin
-- Test statements here
doc_in := dbms_xmldom.newdomdocument(
'<?xml version="1.0" encoding="UTF-8"?>' ||
'<ap:Collection xmlns:ap="http://www.abc.com/ap" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.abc.com/ap template.xsd"> ' ||
'<ap:info>' ||
'<ap:data name="Barbie" age="3">' ||
'</ap:data>' ||
'</ap:info>' ||
'</ap:Collection>');
aNodeList := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(doc_in),
'/ap:Collection/ap:info',
'xmlns:ap="http://www.abc.com/ap"');
dbms_output.put_line('length of aNodeList = '|| dbms_xmldom.getLength(aNodeList) );
end; -
Hi-
I'm trying to use the latest Xercies/Xalan classes in OC4J 10.1.3 as described in the How-To swap XML Parsers document:
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
What I can see happening is that the oracle.xml shared library is successfully 'turned off', but the xalan libraries are not added. Instead, the default xml classes that are distributed with the JDK become visible. For instance, using a slightly modified version of the index.jsp page from the how-to, I get this result:
------ Output from JSP page ----------------
TransformerFactory Instance: org.apache.xalan.processor.TransformerFactoryImpl
Transformer Instance: org.apache.xalan.transformer.TransformerIdentityImpl
Transformer Version: Xalan Java 2.4.1 (!!)
What I expect is for that last line to say version 2.7.0, which is the version of the xalan.jar included in my shared library (code to add that line to the how-to shown below).
I suspect what is happening is that the class loader is simply not letting a shared library override a system library - to do that you probably need to place the jar files in system endorsed directory.
Has anyone gotten this how-to to work - actually replacing the XML parser/transform classes with the latest Xalan classes? Are you sure it is seeing the current version you placed in the shared library?
Thanks,
Eric Everman
---- My modified getXSLTDetails() method in the index.jsp page of the how-to -------
<!-- Additional Import -->
<%@ page import="org.apache.xalan.Version" %>
public static String getXSLTDetails()
Transformer transformer=null;
TransformerFactory transformerfactory = TransformerFactory.newInstance();
Version ver = null;
String br = "<" + "br" + ">"; //otherwise the otn forum chocks on the break.
try
transformer = transformerfactory.newTransformer();
ver = (Version) transformer.getClass().forName("org.apache.xalan.Version").newInstance();
String ret_val =
"TransformerFactory Instance: "+transformerfactory.getClass().getName() + br +
"Transformer Instance: "+transformer.getClass().getName() + br;
if (ver != null) {
ret_val = ret_val + "Transformer Version: " + ver.getVersion() + br;
} else {
ret_val = ret_val + "Transformer Version not Available" + br;
return ret_val;
catch (Exception e)
e.printStackTrace();
return e.getMessage();
}--------------------------------------------------------------------Steve - Thanks for responding on this.
The Xalan SQL extension is built into Xalan. The most painless way to try it out is to run it via JEdit: www.jedit.org
JEdit a OS Java application with a fairly painless install process (I'm assuming you already have a current JRE installed). Once its installed, you'll need to install the XSLT plugin - in JEdit goto Plugins | Plugin Manager | Install and pick the XSLT plugin. You'll need the Oracle JDBC classes on your classpath - this can be done by copying the oracle_jdbc4.jar into the [JEdit install directory]/jars directory.
Restart to load that jar and you should be all set.
I included a sample XSLT page at the bottom of this post that is somewhat of a template transform for the SQL extension - its more complicated then it needs to be, but it does some nice things with the results of the query. Save it as a file and make the appropriate changes to the 'datasource' parameter near the top of the file.
Then in JEdit, open the file and make sure the XSLT plugin is visible (Plugins | XSLT | XSLT Processor Toggle - or alternately dock it in the window via global prefs). In the XSLT plugin: Allow the current buffer to be used as the source, Add that same file as a stylesheet via the '+' button, and pick a result file at the bottom. Then click the 'Transform XML' button.
Troubleshooting: I seem to remember having some classpath errors when I tried this on windows, but others have had it work w/o issues. I do remeber that the XSLT plugin had a popup window that gave a pretty good explaintion of the problem, if it occurs. Also, for some reason the XSLT plugin will not create a new file for the output, so its often best to create a file first, then choose it as the output. Of course, you can always run a transformation from the command line or w/in an applicatoin. Full docs on the Xalan SQL extension can be found at: http://xml.apache.org/xalan-j/extensionslib.html#sql
Here is my sample XSLT transform using the SQL extension:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sql="http://xml.apache.org/xalan/sql"
xmlns:str="http://exslt.org/strings"
xmlns:xalan="http://xml.apache.org/xalan"
extension-element-prefixes="sql str xalan">
<xsl:output indent="yes"/>
<xsl:param name="driver">oracle.jdbc.OracleDriver</xsl:param>
<xsl:param name="datasource">jdbc:oracle:thin:jqpublic/jqpublic@server_name:1521:dbname</xsl:param>
<xsl:param name="jndiDatasource"><!-- jndi source for production use w/in enterprise environment --></xsl:param>
<xsl:param name="debug">true</xsl:param>
<xsl:variable name="connection" select="sql:new()"/>
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'"/>
<!--
The query: You could pass parameters in to this query to build a where clause, but here is a simple example.
Also, its nice to wrap the query with a max row number to prevent huge results.
-->
<xsl:param name="query">
select * from (
SELECT
'One' FIELD_1,
'Two' FIELD_2
FROM DUAL
) where rownum < 100
</xsl:param>
<!-- Essentially, create a XConnection object -->
<xsl:variable name="connection" select="sql:new()"/>
<xsl:template match="/">
<xsl:choose><!-- Connect using JNDI -->
<xsl:when test="$jndiDatasource != ''">
<xsl:if test="not(sql:connect($connection, $jndiDatasource))">
<xsl:message>Failed to connect to db via jndi connection</xsl:message>
<xsl:comment>Failed to connect to db via jndi connection</xsl:comment>
<xsl:if test="$debug = 'true'">
<xsl:copy-of select="sql:getError($connection)/ext-error"/>
</xsl:if>
</xsl:if>
</xsl:when>
<xsl:otherwise><!-- Connect using connection string -->
<xsl:if test="not(sql:connect($connection, $driver, $datasource))">
<xsl:message>Failed to connect to db via driver/url connection</xsl:message>
<xsl:comment>Failed to connect to db via driver/url connection</xsl:comment>
<xsl:if test="$debug = 'true'">
<xsl:copy-of select="sql:getError($connection)/ext-error"/>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<!--
The results of the query. The rowset is brought back in 'streaming' mode,
so its not possible to ask it for the number of rows, or to check for zero
rows. There is a switch to disable streaming mode, but this requires all
rows to be brought into memory.
-->
<xsl:variable name="table" select="sql:query($connection, $query)"/>
<xsl:if test="not($table)">
<xsl:message>Error in Query</xsl:message>
<xsl:copy-of select="sql:getError($connection)/ext-error"/>
</xsl:if>
<page>
<!-- Your xalan environment -->
<xsl:copy-of select="xalan:checkEnvironment()"/>
<!-- Build a bunch of metadata about the rows -->
<meta>
<cols>
<xsl:apply-templates select="$table/sql/metadata/column-header"/>
</cols>
</meta>
<rowset>
<!--
With streaming results, you must use the apply-temmplates contruct,
not for-each, since for-each seems to attempt to count the rows, which
returns zero.
-->
<xsl:apply-templates select="$table/sql/row-set"/>
</rowset>
</page>
<xsl:value-of select="sql:close($connection)"/><!-- Always close -->
</xsl:template>
<xsl:template match="row">
<row>
<xsl:apply-templates select="col"/>
</row>
</xsl:template>
<xsl:template match="column-header">
<col>
<xsl:attribute name="type">
<xsl:value-of select="@column-typename"/>
</xsl:attribute>
<xsl:attribute name="display-name">
<xsl:call-template name="create-display-name"/>
</xsl:attribute>
<xsl:value-of select="@column-name"/>
</col>
</xsl:template>
<!-- Convert column names to proper caps: MY_FIELD becomes My Field -->
<xsl:template name="create-display-name">
<xsl:variable name="col-name">
<xsl:for-each select="str:tokenize(@column-name, '_')">
<xsl:value-of
select="concat(translate(substring(., 1, 1), $lowercase, $uppercase), translate(substring(.,2), $uppercase, $lowercase), ' ')"/>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="substring($col-name, 1, string-length($col-name) - 1)"/>
</xsl:template>
<!-- Creates data columns named 'col' with a column-name attribute -->
<xsl:template match="col">
<col>
<xsl:attribute name="column-name"><xsl:value-of select="@column-name"/></xsl:attribute>
<xsl:value-of select="."/>
</col>
</xsl:template>
</xsl:stylesheet>
Maybe you are looking for
-
My gallery wont synce to photoshop touch
my gallery pictures wont sync to photoshop touch
-
Capturing to interal drive then movie to external--help
I plan to capture footage to my interal MBP hard drive using FCE. I have already set up FCE to use my external drive as my scratch disk. Could anyone give me a quick tutorial on how to temporarily capture to my internal and then where to put it on th
-
About table CRMC_OBJREF_S_T
Hello all, In all the transactions which contains ' reference' field, there is a drop down list value for all the reference object list. Such as "opportunities, quotes and so on". My purpose is to change description of the reference object " complai
-
Disable login for embedded purpose
Hi all, I need some hints about an argument. I need to disable the login on my archlinux. I guess there is a specific service that I need to disable. Can someone tell what it is ? After that I've disabled is there a way to enable ? Thanks for any rep
-
I getting a lot of spam email lately and it seems that the primary source for getting my email is this public visible message on your forum: URL = Re: JDeveloper 10.1.3 EA and PostGresSQL #######################################3 Re: JDeveloper 10.1.3