Empty element tags

Hi,
WHile using oracle v2 parser,
I am getting empty element tag as
<table/>
which is correctly rendered in nav but not in ie.
i want it to be
<table></table>
this is correctly displayed by both.
Below is sample code of xsl..
<table>
<xsl:for-each select = "m">
<tr>
<td bgcolor = "#FF4500">
<b><xsl:value-of select = "name/text()" /></b>
</td>
</tr>
<tr>
<td bgcolor = "#FFAO7A">
<table>
<xsl:for-each select = "m">
<tr>
<td>
<xsl:choose>
<xsl:when test = "(string(url/text()))">
<a>
<xsl:attribute name = "href">
<xsl:value-of select="url" />
</xsl:attribute>
<xsl:value-of select = "name/text()" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select = "name/text()" />
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:for-each>
<tr>
</tr>
</table>
my entire formating depends on this.
null

Her is the sample file of html which is rendered..
it shows differently in ie and nav.
<html xmlns="http://www.w3.org/TR/REC-html40">
<head>
<title>Portal Page</title>
</head>
<body>
<div class="topFrame">
<table>
<tr>
<td>xzy</td>
<td>abc</td>
</tr>
</table>
</div>
<h1> Portal Section hello</h1>
<div class="firstSection">
<h2>etb</h2>
<table>
<tr>
<td bgcolor="#FF4500">
<b>security</b>
</td>
</tr>
<tr>
<td bgcolor="#FFAO7A">
<table>
<tr>
<td>corporate actions
</td>
<td bgcolor="#FFDEAD">
<table>
<tr>
<td>
announcements
calender
</td>
<td>
<table/>
</td>
</tr>
<tr>
<td>
announcements
report
</td>
<td>
<table/>
</td>
</tr>
<tr>
<td>
Visit places
</td>
<td>
<table/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>income
</td>
<td bgcolor="#FFDEAD">
<table>
<tr>
<td>
income
calender
</td>
<td>
<table/>
</td>
</tr>
<tr>
<td>
Visit report
</td>
<td>
<table/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FF4500">
<b>mis overview reports</b>
</td>
</tr>
<tr>
<td bgcolor="#FFAO7A">
<table>
<tr>
<td>Standard management overview
</td>
<td bgcolor="#FFDEAD">
<table>
<tr>
<td>
fails (by
age-category)
</td>
<td>
<table/>
</td>
</tr>
<tr>
<td>
Daily overview
fails
</td>
<td>
<table/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
</table>
<h2>xyz</h2>
<table>
<tr>
<td bgcolor="#FF4500">
<b>operations</b>
</td>
</tr>
<tr>
<td bgcolor="#FFAO7A">
<table>
<tr>
<td>
New York
</td>
<td bgcolor="#FFDEAD">
<table/>
</td>
</tr>
<tr>
<td>Frankfurt - London
</td>
<td bgcolor="#FFDEAD">
<table/>
</td>
</tr>
<tr>
<td>
Frankfurt
- London Trades (shows)
</td>
<td bgcolor="#FFDEAD">
<table/>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
</table>
</div>
</body>
</html>
Above html generated using oracle v2 parser renders differently in both browsers.
Thanks
Raju

Similar Messages

  • Wrong results for context search on empty element tags

    I'm using Oracle DBMS 11.1 and 11.2 and created a context index on an XML column (section group: PATH_SECTION_GROUP).
    When entering a query like
    SELECT count(*) FROM my_table t WHERE contains (t.co_xml,'hasPath(/tag1/tag2)') > 0
    I get wrong results if tag2 is an empty element tag (<tag2/>) that appears somewhere within the
    XML instance, but NOT directly under tag1.
    E.g., the following XML instance is found (but shouldn't!):
    <a>
    <tag1>bla<tag3>bla</tag3></tag1>
    <tag4>bla<tag2/></tag4>
    </a>
    This seems to happen only for empty element tags. Is this a known bug and does anybody know a workaround?
    Thanks in advance for your help!
    Roman

    I am unable to reproduce the problem. Can you provide a copy and paste of an actual run, including create table, insert data, create index, and select, as I have done below?
    SCOTT@orcl_11g> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE     11.1.0.6.0     Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SCOTT@orcl_11g> create table my_table
      2    (co_xml     xmltype)
      3  /
    Table created.
    SCOTT@orcl_11g> insert into my_table values (
      2  xmltype ('<?xml version="1.0"?>
      3  <tag5>
      4    <tag1>bla<tag3>bla</tag3></tag1>
      5    <tag4>bla<tag2/></tag4>
      6  </tag5>'))
      7  /
    1 row created.
    SCOTT@orcl_11g> create index my_idx
      2  on my_table (co_xml)
      3  indextype is ctxsys.context
      4  parameters ('section group ctxsys.path_section_group')
      5  /
    Index created.
    SCOTT@orcl_11g> SELECT count(*)
      2  FROM   my_table t
      3  WHERE  contains (t.co_xml, 'hasPath (//tag1/tag2)') > 0
      4  /
      COUNT(*)
             0
    SCOTT@orcl_11g> SELECT count(*)
      2  FROM   my_table t
      3  WHERE  contains (t.co_xml, 'hasPath (//tag1/tag3)') > 0
      4  /
      COUNT(*)
             1
    SCOTT@orcl_11g>

  • Error While trying to Get XML element(tag) Values

    We are trying to get XML element (TAG) value from the XML pay load.
    Example.
    Getting XML String from a web service and then converting into XML payload.
    ora:parseEscapedXML(bpws:getVariableData('signOn_Out','signOnReturn'))
    From this XML payload we are trying to get an element (Tag) value.
    We are getting following error
    Error in evaluate <from> expression at line "130". The result is empty for the XPath expression : "/client:TririgaProcessResponse/client:User/client:LastName".
    oracle.xml.parser.v2.XMLElement@118dc2a
    {http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.
    - <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    - <part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/client:TririgaProcessResponse/client:User/client:LastName" is empty at line 130, when attempting reading/copying it.
    Please make sure the variable/expression result "/client:TririgaProcessResponse/client:User/client:LastName" is not empty.
    </summary>
    </part>
    </selectionFailure>
    Here are signOnReturn and XML Payload XSD's
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/Web1"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="Web1ProcessRequest">
              <complexType>
                   <sequence>
                        <element name="userName" type="string"/>
    <element name="password" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="Web1ProcessResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
    </schema>
    <?xml version="1.0" encoding="windows-1252" ?>
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/Web"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="TProcessResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
    <element name="User">
    <complexType>
                   <sequence>
                        <element name="Id" type="string"/>
    <element name="CompanyId" type="string"/>
    <element name="SecurityToken" type="string"/>
    <element name="FirstName" type="string"/>
    <element name="LastName" type="string"/>
    </sequence>
    </complexType>
    </element>
                   </sequence>
              </complexType>
         </element>
    </schema>

    I am sure and can see the data in audit trail.
    [2006/12/12 09:17:36]
    Updated variable "signOn_Output"
    - <signOn_Output>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    - <WebMethodsProcessResponse xmlns="http://xmlns.oracle.com/WebMethods">
    <Result xmlns="">
    Success
    </Result>
    - <User xmlns="">
    <Id>
    2694069
    </Id>
    <CompanyId>
    208133
    </CompanyId>
    <SecurityToken>
    1165936654605
    </SecurityToken>
    <FirstName>
    Jagan
    </FirstName>
    <LastName>
    Rao
    </LastName>
    </User>
    </WebMethodsProcessResponse>
    </part>
    </signOn_Output>
    Copy details to clipboard
    [2006/12/12 09:17:36]
    Updated variable "tririga"
    - <tririga>
    - <TririgaProcessResponse xmlns="http://xmlns.oracle.com/WebMethods">
    <Result xmlns="">
    Success
    </Result>
    - <User xmlns="">
    <Id>
    2694069
    </Id>
    <CompanyId>
    208133
    </CompanyId>
    <SecurityToken>
    1165936654605
    </SecurityToken>
    <FirstName>
    Jagan
    </FirstName>
    <LastName>
    Rao
    </LastName>
    </User>
    </TririgaProcessResponse>
    </tririga>
    Copy details to clipboard
    [2006/12/12 09:17:36]
    Updated variable "Variable_2"
    - <Variable_2>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    - <TririgaProcessResponse xmlns="http://xmlns.oracle.com/WebMethods">
    <Result xmlns="">
    Success
    </Result>
    - <User xmlns="">
    <Id>
    2694069
    </Id>
    <CompanyId>
    208133
    </CompanyId>
    <SecurityToken>
    1165936654605
    </SecurityToken>
    <FirstName>
    Jagan
    </FirstName>
    <LastName>
    Rao
    </LastName>
    </User>
    </TririgaProcessResponse>
    </part>
    </Variable_2>
    Copy details to clipboard
    [2006/12/12 09:17:36]
    Error in evaluate <from> expression at line "130". The result is empty for the XPath expression : "/client:TririgaProcessResponse/client:User/client:LastName".
    oracle.xml.parser.v2.XMLElement@1c8768e
    Copy details to clipboard
    [2006/12/12 09:17:36]
    "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.
    - <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    - <part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/client:TririgaProcessResponse/client:User/client:LastName" is empty at line 130, when attempting reading/copying it.
    Please make sure the variable/expression result "/client:TririgaProcessResponse/client:User/client:LastName" is not empty.
    </summary>
    </part>
    </selectionFailure>
    Copy details to clipboard

  • Empty Elements: Breach with Paragraph 2.1.4 of JSP 1.1 Specificat ion?

    Hi,
              I think I found a violation of the JSP1.1 spec and I'd like to know
              opinions if I am correct or if I missed something.
              This is what the JSP spec says on empty elements:
              2.1.4 Empty Elements
              Following the XML specification, an element described using an empty tag
              is
              indistinguishable from one using a start tag, an empty body, and an end
              tag.
              Thus there should be no difference between these two custom tags:
              1. <sw:cv key="string" number="1" />
              2. <sw:cv key="string" number="1"></sw:cv>
              While the first compiles fine, the second produces the following error
              message on WebLogic 5.1 SP9:
              Parsing of JSP File '/layouts/1029128.jsp' failed:
              /layouts/1029128.jsp(-1): Error in tag library at: 'sw': The TLD
              description for tag 'cv' requires that the body be empty.
              probably occurred due to an error in /layouts/1029128.jsp line -1:
              I generate my JSPs using an XSLT transformation and the processor
              generates the tags with empty elements. I do not see a chance to change
              this behaviour. A possible workaround could be to allow a tag body, but
              I am afraid of possible side effects (performance, misuse of the tag).
              Would you agree that this behaviour is in contradiction to the
              specification?
              Thanks for your time!
              Daniel
              

    Hi,
              I think I found a violation of the JSP1.1 spec and I'd like to know
              opinions if I am correct or if I missed something.
              This is what the JSP spec says on empty elements:
              2.1.4 Empty Elements
              Following the XML specification, an element described using an empty tag
              is
              indistinguishable from one using a start tag, an empty body, and an end
              tag.
              Thus there should be no difference between these two custom tags:
              1. <sw:cv key="string" number="1" />
              2. <sw:cv key="string" number="1"></sw:cv>
              While the first compiles fine, the second produces the following error
              message on WebLogic 5.1 SP9:
              Parsing of JSP File '/layouts/1029128.jsp' failed:
              /layouts/1029128.jsp(-1): Error in tag library at: 'sw': The TLD
              description for tag 'cv' requires that the body be empty.
              probably occurred due to an error in /layouts/1029128.jsp line -1:
              I generate my JSPs using an XSLT transformation and the processor
              generates the tags with empty elements. I do not see a chance to change
              this behaviour. A possible workaround could be to allow a tag body, but
              I am afraid of possible side effects (performance, misuse of the tag).
              Would you agree that this behaviour is in contradiction to the
              specification?
              Thanks for your time!
              Daniel
              

  • Delete empty rows while having empty xml tag

    I've seen something like same but it doesn't work for me. I have a table which is created using xml rules, some time it contains empty xml tag also converted into row but I don't want these empty rows. After table creation empty rows need to be deleted.
    I've got this script from this forum which delete empty rows
    for(var i=myDocument.textFrames.length-1; i>=0; i--){
      for(var j=myDocument.textFrames[i].tables.length-1; j>=0; j--){
       for(var k=myDocument.textFrames[i].tables[j].rows.length-1; k>=0; k--){
        myContents = 0;
        for(var l=myDocument.textFrames[i].tables[j].rows[k].cells.length-1; l>=0; l--){
         if (myDocument.textFrames[i].tables[j].rows[k].cells[l].contents != "") myContents++;
         if (myContents == 0) myDocument.textFrames[i].tables[j].rows[k].remove();
    but incase of any cell contains empty xml element it goes blank. Could any one help on this.
    Thanks
    Mac

    Gyan,
    Thanks for your help. I have modified the code as below:
    public void removeblankline()
    OAViewObject rvo = (OAViewObject)findViewObject("NCRPaymentExtLineVO1");
    Row row[] = rvo.getAllRowsInRange();
    System.out.println("Remove all blank rows");
    System.out.println("Total Rows"+rvo.getRowCount());
    int jcount = rvo.getRowCount();
    for (int j=0;j< jcount;j++)
    NCRPaymentExtLineVORowImpl rowj = (NCRPaymentExtLineVORowImpl)row[j];
    System.out.println("Check Line Number: "+j);
    System.out.println("Line Type Lookup Code: "+rowj.getLineTypeLookupCode());
    if((rowj.getLineTypeLookupCode()==null)||("".equals(rowj.getLineTypeLookupCode().trim())))
    System.out.println("Removed Line Number: "+j);
    rowj.remove();
    System.out.println("Processed with Line Number: "+j);
    } // end removeblankline
    This is the change I have done:
    int jcount = rvo.getRowCount();

  • How to avoid empty elements in generated xml text

    I am using XMLBeans to generate xml.
    If I set text value for a tag then it displaying like
    <param name="org">Satyam</param>
    If I set empty text value for the same tag it generateing xml text like
    <param name="org"/>
    But I don't need empty elements in generated xml like this way. Even though I set empty text to a tag it has to display like
    <param name="org"></param>
    How can I do this one.
    Message was edited by Mouli at Dec 14, 2004 2:55 AM

    Hi,
    by the book these two representations are identical
    <.... />
    <....></....>
    as for the XML-parser.
    What problem are you facing with the <... /> representation?
    I will try to investigate a bit to see if the XMLBean can be forced to write the <....></....> representation.
    - Anders M.

  • How to change the default element tag using dbms_xmlgen

    here is my code that generate output for purchase order data. I followed the syntax shown in xml db developer guide.
    I am getting the results but element tags are CAPS letters( As the coloumn names in the type defenitions are stored in CAPS in Oracle). but I need to show in small letters as per my requirement.
    can anyone help me how to change the default tag names for elements.
    ==================================HERE IS THE CODE==================
    DECLARE
    qryCtx DBMS_XMLGEN.ctxHandle;
    result CLOB;
    BEGIN
    qryCtx := DBMS_XMLGEN.newContext
    ('SELECT PODL_H_T
    ( CLOSEDDATETIME ,
    COMPANY ,
    CAST(MULTISET
    (SELECT LINENUMBER ,
    COMPANY ,
    PURCHASEORDERID ,
    ITEM ,
    QUANTITYUM ,
    TOTALQUANTITY
    FROM cpo_wms_podl_LINES
    WHERE PURCHASEORDERID = PH.PURCHASEORDERID) as PurchaseOrderDetailList
    FROM cpo_wms_podl_HEADERS PH ');
    -- now get the result
    DBMS_XMLGEN.setRowSetTag(qryCtx, 'Receipts' );
    DBMS_XMLGEN.setRowTag(qryCtx, 'PurchaseOrder' );
    result := DBMS_XMLGEN.getXML(qryCtx);
    INSERT INTO temp_clob_tab VALUES (result);
    DBMS_XMLGEN.closeContext(qryCtx);
    END;
    -- select * from temp_clob_tab
    ===========create type script=====================
    cpo_wms_podl_HEADERS
    CREATE or replace TYPE PurchaseOrderDetail AS OBJECT(
    LINENUMBER VARCHAR2(400 BYTE),
    COMPANY VARCHAR2(400 BYTE),
    PURCHASEORDERID VARCHAR2(400 BYTE),
    ITEM VARCHAR2(400 BYTE),
    QUANTITYUM VARCHAR2(400 BYTE),
    TOTALQUANTITY NUMBER
    create type PurchaseOrderDetailList as table of PurchaseOrderDetail
    create table temp_clob_tab(result CLOB)
    create type podl_HEADERS_list_t as table of podl_HEADERS_t
    CREATE or replace TYPE PODL_H_T AS OBJECT
    CLOSEDDATETIME DATE,
    COMPANY VARCHAR2(400 BYTE),
    CREATEDDATETIME DATE,
    PURCHASEORDERID VARCHAR2(400 BYTE),
    SHIP_TO VARCHAR2(400 BYTE),
    linelist PurchaseOrderDetailList
    )

    but I need to show in small letters as per my requirement.add alias column names in double quotes as in
    SQL> select dbms_xmlgen.getxmltype('select dname "DeptName", loc "Location" from dept') dept_xml from dual
    DEPT_XML                                                                       
    <ROWSET>                                                                       
      <ROW>                                                                        
        <DeptName>ACCOUNTING</DeptName>                                            
        <Location>NEW YORK</Location>                                              
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>RESEARCH</DeptName>                                              
        <Location>DALLAS</Location>                                                
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>SALES</DeptName>                                                 
        <Location>CHICAGO</Location>                                               
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>OPERATIONS</DeptName>                                            
        <Location>BOSTON</Location>                                                
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>SALES</DeptName>                                                 
        <Location>MUNICH</Location>                                                
      </ROW>                                                                       
    </ROWSET>                                                                      
    1 row selected.

  • Remove Empty XML Tags using module parameters

    Hi All,
    In my lanscape I have two PI Systems.
    My scenario is an IDOC reaches 1st PI system gets converted into an EDIFACT and then goes to the 2nd PI and from there it gets routed to the respective AS2 Party.
    I am using SOAP to pass message between the PI systems and B2B Toolkit's AS2 Adapter for the communication with AS2 party.
    The issue is when the message is getting converted from IDOC to EDIFACT there are a few feilds with occurence 1..1 and due to these fields i get an empty XML tag at the output. These empty XML tags give me an error in the B2B Toolkit's AS2 Adapter Receiver Channel
    I cannot change the occurence in the structure of the EDIFACT nor can I use an XSLT mapping to remove empty tags before the message reaches the Communication Channel.
    I want to know if there are any module parameters which i can use either in SOAP Channel or the AS2 Channel to remove the XML Tags.

    Hi Muni,
    "1..1 means, you must send some values for that fields. try to find out why these are not getting any values."
    This empty tag is expected. Before using B2B Toolkit's AS2 Adapter we used to use Seeburger's AS2 Adpater and the message used to get executed successfully with these empty tags.The issue is coming only when we are using B2B Toolkit's AS2 Adapter.
    "if you want to stop sending(the fields which are not needed in target) you can you can disable the fields in the message mapping."
    I cannot disable the feild in the mapping as some other message may use this field.
    Thanks,
    Farhaan

  • How to delete empty element in popup list

    I have a question about a suspicious behaviour in Forms Builder 10.1.2.0.2.
    When I have a list object (pop up list) I can define some values in the attribute palette of the object.
    So you can set a shown name and a value behind. In this little window to set the items of the popup list you get automatically a white empty item at the end of the list. When I click now on this empty item (you do so, when you want to add an item) Forms Builder automatically adds an new empty item at the end.
    When I click this new empty item, Forms Builder adss another empty one ... and so on.
    It´s very suspicious because, when I end this dialog with "OK", it will be saved and when I open the form (over web) I have at the end of the list one, two (or more) empty elements in list.
    But I can´t delete this empty ones from the list in Forms Builder.
    So my question:
    how can I delete empty items in a popup list??
    I try it with hit "del" button at keyboard or delete the set value for the item (I hope Forms Builder delete items without value). But all does not help.

    Thanks jwh for this great solution! :)
    On my german keyboard it is:
    ctrl+< for deleting a line
    ctrl+> (= ctrl+shift+<) for adding a new line
    Thanks! :)
    I have another question (you can maybe help me, too?).
    On this popup lists you can have several items. When you open a form (via web) and the list has more than x items (maybe 5 or 6) the form shows a scroll bar on the right side.
    Is there any poosibility to set how much items has to show and only show a scroll bar when there are more items in the list?
    Or other way: set the maximum of shown items so big, that there will be no scroll bar.
    Message was edited by:
    ulfk

  • JDev deletes empty elements in transform activity

    Dear all,
    the XSD in my BPEL process defines a "Group" element:
    <xs:element name="Groups">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Group" type="Group_Type" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="Group_Type">
    <xs:sequence>
    <xs:element name="id" type="xs:int"/>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="desc" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    As one can see, a "Group" element contains three mandatory elements named "id", "name" and "desc". This "Group" element is the output target of an XSLT transform activity in my BPEL process.
    In the output target, the "desc" element should be empty (<desc/> or <desc></desc>). Therefore, the corresponding XSLT should look like:
    <foo:Group>
    <foo:id>
    <xsl:value-of select="'do something'"/>
    </foo:id>
    <foo:name>
    <xsl:value-of select="'do something'"/>
    </foo:name>
    <foo:desc/>
    </foo:Group>
    First, it is not possible to define an empty element (<desc/>) in the graphical design modus of an XSLT transform activity. Or is there a workaround available?
    Second, when inserting the empty element in the source modus => saving the document => changing to the graphical design modus => do something in the graphical design modus => returning to the source modus, the empty element was deleted by JDeveloper! Is there a workaround for this very annoying bug of Jdev?
    Thanks in advance!
    Lars

    You can also append an xml fragment to put back the missing fields....for example:
    - Type: Append (Note, this is different than the copy operation)
    - From Type: XML Fragment
    - From Value:
    <ns4:ShipTo xmlns:ns4="http://www.globalcompany.com/ns/order">
    <ns4:Name>
    <ns4:First/>
    <ns4:Last/>
    </ns4:Name>
    </ns4:ShipTo>
    (Replace ns4 in this example with your namespace .)
    - To Type: Variable

  • Xml loading and empty elements

    Hi,
    I'm having problems with Flex and xml data.
    I've created an app to edit pre-existing xml files or create new xml files, which are then saved out.  The xml node structure is defined (and cannot be changed as it's widely used across the company and it's associates).
    The problem is that as soon as the xml is loaded using a URLLoader class, any xml nodes that are empty are changed from:
    <nodename></nodename>
    to
    <nodename />
    This is how the data is traced out / saved, but this is useless to me as I need to keep the existing structure as the file may be edited outside of the app.
    Is there a way to prevent the xml data from being changed in this way?  Adobe's own documentation even says:
    'If an element contains no content, it can be written as an empty element (sometimes called a self-closing element). In XML, this element:<lastplayed/> is identical to this element: <lastplayed></lastplayed>'.
    In which case, why does this get re-written all the time?
    If anyone can help with this I'd be really grateful, as I just can't find a way to solve this.
    Thanks,
    ferdyferret

    Is there really no answer to prevent this then?
    ferdyferret

  • XML element tag problem

    Hi guys,
    I am facing a problem in parseing a XML file when the element is in <element/> tag format. Iam using "javax.xml.parsers.SAXParser" to parse the XML. Basically XML contains many fields that are mandatary in my XSD. my requirement is that if there is a SAXParseException, I should get the name of the element for which the error is comming.
    What I am doing is, I am storing the name of the element in startElement method, which I print it in the catch block of the error. This code is working fine for <element></element> type of tag. But when the element tag is <element/> this. it does not go in the startElement or endElement block. Hence I always get the name element which is previous to the error element.
    How can I get the element name in both form of the element tag. As I have no control over the XML, which is posted on my servlet.

    I'm not sure why you're having a problem - the SAXException tells you where in the input stream the error is, and SAX parsers may report a validation error at any time so long as it is before passing the invalid element to the content handler. So it's legal for the exception to occur immediately after the startDocument, and will not necessarily occur immediately after the callback for the preceding element.
    Eg, if the DTD says you have <!ELEMENT foo (a,b,c,d)> and you have <foo><a/><b/><x/><d/></foo>, then the parser may well report the error before the startElement() call for the foo element, as it is invalid. Such fail-fast parser validation means you can safely update a persistant resource on receipt of the events, rather than having to wait until the element is closed before you are sure it's valid.
    This works fine for <element/> tag. But now there is a problem with <element></element> tag.Post the code you have, show how you are mapping from the line no. in the exception to the source data, and state which parser you are using.
    Pete

  • How to refer ?XML element tag name? in the RTF variable

    Hi All,
    I want to declare variable and assign the value of XML element tag to that variable.
    Following are the steps:
    <?xdoxslt:set_variable($_XDOCTX, MYCOUNT,1)?>
    <?xdoxslt:get_variable($_XDOCTX, MYCOUNT)?>
    <?if: xdoxslt:get_variable($_XDOCTX, MYCOUNT) =1?>xxx<?end if?>
    In the declaration part,I need to replace 1 with some of the xml element tag value(for example : <?vendor_name?>).
    But when I try to do so,I get some list of exceptions.
    Please suggest how to proceed.
    Thanks and Regards,
    Kaveri

    Hi Pradeep,
    Thanks for your response.Here my requirement goes:
    for -each:
    text(database value)
    end for-each
    This text value will continue from page 1 to N.
    So for page1 I want HEADER1 and from page2 onwards,I require different header HEADR2.
    By using your approach,my text which needs to be continued on different pages will not be acheived.
    One more thing I got from XMLP User guide:
    <xdofo:inline-total
    display-condition="exceptfirst"
    name="InvAmt">.
    SInce all my tags are generated from Oracel reports,I am unable to use the above xml line.Is there any way to use this by modifying the syntax..
    Please let me know your suggestions since this is show stopper for my report.
    Thanks and Regards,
    Kaveri

  • Select count(*) and blank element tags

    Is there a way other than column aliases to produce and return an element tag for the following xsql query.
    <xsql:query
    connection="{@cxn}"
    xmlns:xsql="urn:oracle-xsql">
    select count(*) from emp
    </xsql:query>
    Some databases such as SQL Server via a JDBC driver will return a blank column name, thus you'll have an invalid XML document, however SQL Server allows one to use column aliases, such as select count(*) as "count" from emp.
    However some databases such as Progress via a JDBC-ODBC bridge and ODBC driver does NOT allow column aliases. Thus I'll always get the following response:
    <ERROR>oracle.xml.sql.OracleXMLSQLException: String index out of range: </ERROR>
    Question. Can I substitute an element tag when I encounter a blank column name using an action handler? Any ideas? Sample code?
    Steve.

    Please have the data structure as below:
    <datastructure>
    <GROUP name="G_1" source="Q_TEMP">
    <element value="DEPTNO" name="DEPTNO" />
    <element value="DNAME" name="DNAME" />
    <element value="LOC" name="LOC" />
    <GROUP name="G_2" source="Q_TEMP1">
    <element value="ENAME" name="ENAME" />
    <element value="SAL" name="SAL" />
    *</GROUP>*
    *<element value="G_2.ENAME" name="TOTL_DETAILS" dataType="number" function="COUNT()" />*
    *<element value="G_2.SAL" name="TOTL_SAL" function="SUM()"/>*
    *</GROUP>*
    </datastructure>
    Aggregate functions to be placed at the level you require it. Here you need at G_1, so place it there.

  • How to handle where xmltype has empty elements

    Here is my problem:
    I have some information stored in table1 and some information in table2.These tables are joined with a key.
    Table2 has an xmltype column. That stores if
    anything (any info) has been overridden. That is has changed. There is information in this table even when nothing is overridden. In that
    case the xmltype has blank elements.
    In my query I have to display all records where the information has been overridden.That is fine as I extract from xmltype column using xmlsequence.
    The issue arises when I need to display information when it is not overridden. In that case since the xmltype has empty
    elements, the query doesnt return anything (NO RECORDS).Here it is not overridden
    <?xml version="1.0" encoding="UTF-8"?>
    <O><AR></AR>
    </O>Here is an example where it is overridden</br>
    <?xml version="1.0" encoding="UTF-8"?>
    <O><AR>
         <L id="A">
              <LL>4</LL>
         </L>
         <L id="B">
              <LL>2.5</LL>
         </L>
    </AR>
    </O>My query is something like:
    select....
    ,extractValue(k.column_value,'/L/@id') as lt,
    extractValue(k.column_value,'/L/LL') AS ll,
    FROM TABLE1 T1, TABLE2 T2,
    , table(xmlsequence(T2.XMLCOL.extract('/O/AR/L')))k
    WHERE ...So to tackle this problem of nothing being returned just because xmltype doesnt have overridden values, i have a query (using union to other)
    that says select null for the xmltype elements that I am selecting.
    I handle null as follows:
    select null as lt,null as ll......
    from ....This returns me a row even if something is overridden. I want a row from this null query only if it is not being returned from the other query.
    I know confusing but...:-(

    I am all set. Added something in where condition. Work around that would work:)

Maybe you are looking for

  • Error while running Hello world from Tutorial

    Hi , I am facing a strange problem while running Hello world from tutorial. The page expires after running for half an hour and the log in the Jdeveloper is [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.] C:\Jdev\jdevbin\jd

  • New Features for Java GUI

    Hello everyone! Can anybody tell about new features in SAP GUI for Java. I think It's emasculate now. It doesn't contain New ABAP editor, Network graphic, normal Screen Painter... I really enjoy adding themes and other stuff, but when these functiona

  • How to Organize the Website With Different Themes?

    This is a question about HOW TO ORGANIZE MY WEBSITE. This requires understanding of what PAGES means and what SITES means, and I am not too sure. Please clarify for me what iWeb means by a website. Specifically, I want to make a website which has sev

  • Cannot use MAX function in PS Query

    I am trying to use Query to select the max ( effdt ) from a table. First, I use the 'Criteria' page to have (1) Expression 1 = A.EFFDT - Effective Date, (2) Condition type = equal to, (3) Expression 2 = Subquery Then the Subquery is: (1) In the 'Fiel

  • Can't put videos on ipod

    i have bought a ipod video 30gb. but when i try to copy any videos into my ipod. there is a message that is doesn't works. at this site they say that i have to convert my video with iTunes. and when i do this, i can copy the video into my ipod, but t