XML removes tag while separating

Hi,
I have a XML doc LIKE this <ROWSET>
<ROW>
<P1>
<ROWSET>
<P1> ----table name
<id>100</id>
<FIRST_NAMEs3</FIRST_NAME>
<LAST_NAME>s3</LAST_NAME>
<P2>
<ROWSET>
<P2>
<f1>1</f2>
<b1>
<ROWSET>
<b1>
<M>1060</M>
</b1>
</ROWSET>
</b1>
</P2>
</p1>
</ROWSET>
</ROW>
i am storing this in Pl/sql table. using dbms_xmldom.getNodeName(n), dbms_xmldom.getNodeNodevalue(n)
I want to retreive table name, column name and column value.
How to suppress <rowset>,<row> and duplication of table name
in this example table names are p1,p2,b1
I have seen many example in this forum, but did't get anything
Pls help its very urgent.
Thanks
Reena

Have you considered generating your XML is slightly different format which would make this much easier to deal with...
Eg instead of using something like this...
SQL> select xmlElement
  2         (
  3            "Schema",
  4            xmlElement
  5            (
  6              "EMP",
  7              dbms_xmlgen.getXMLTYPE('select * from EMP')
  8            ),
  9            xmlElement
10            (
11              "DEPT",
12              dbms_xmlgen.getXMLType('select * from DEPT')
13            )
14         ).extract('/*')
15    from DUAL
16  /
<Schema>
  <EMP>
    <ROWSET>
      <ROW>
        <EMPNO>7369</EMPNO>
        <ENAME>SMITH</ENAME>
        <JOB>CLERK</JOB>
        <MGR>7902</MGR>
        <HIREDATE>17-DEC-80</HIREDATE>
        <SAL>800</SAL>
        <DEPTNO>20</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7499</EMPNO>
        <ENAME>ALLEN</ENAME>
        <JOB>SALESMAN</JOB>
        <MGR>7698</MGR>
        <HIREDATE>20-FEB-81</HIREDATE>
        <SAL>1600</SAL>
        <COMM>300</COMM>
        <DEPTNO>30</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7521</EMPNO>
        <ENAME>WARD</ENAME>
        <JOB>SALESMAN</JOB>
        <MGR>7698</MGR>
        <HIREDATE>22-FEB-81</HIREDATE>
        <SAL>1250</SAL>
        <COMM>500</COMM>
        <DEPTNO>30</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7566</EMPNO>
        <ENAME>JONES</ENAME>
        <JOB>MANAGER</JOB>
        <MGR>7839</MGR>
        <HIREDATE>02-APR-81</HIREDATE>
        <SAL>2975</SAL>
        <DEPTNO>20</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7654</EMPNO>
        <ENAME>MARTIN</ENAME>
        <JOB>SALESMAN</JOB>
        <MGR>7698</MGR>
        <HIREDATE>28-SEP-81</HIREDATE>
        <SAL>1250</SAL>
        <COMM>1400</COMM>
        <DEPTNO>30</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7698</EMPNO>
        <ENAME>BLAKE</ENAME>
        <JOB>MANAGER</JOB>
        <MGR>7839</MGR>
        <HIREDATE>01-MAY-81</HIREDATE>
        <SAL>2850</SAL>
        <DEPTNO>30</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7782</EMPNO>
        <ENAME>CLARK</ENAME>
        <JOB>MANAGER</JOB>
        <MGR>7839</MGR>
        <HIREDATE>09-JUN-81</HIREDATE>
        <SAL>2450</SAL>
        <DEPTNO>10</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7788</EMPNO>
        <ENAME>SCOTT</ENAME>
        <JOB>ANALYST</JOB>
        <MGR>7566</MGR>
        <HIREDATE>19-APR-87</HIREDATE>
        <SAL>3000</SAL>
        <DEPTNO>20</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7839</EMPNO>
        <ENAME>KING</ENAME>
        <JOB>PRESIDENT</JOB>
        <HIREDATE>17-NOV-81</HIREDATE>
        <SAL>5000</SAL>
        <DEPTNO>10</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7844</EMPNO>
        <ENAME>TURNER</ENAME>
        <JOB>SALESMAN</JOB>
        <MGR>7698</MGR>
        <HIREDATE>08-SEP-81</HIREDATE>
        <SAL>1500</SAL>
        <COMM>0</COMM>
        <DEPTNO>30</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7876</EMPNO>
        <ENAME>ADAMS</ENAME>
        <JOB>CLERK</JOB>
        <MGR>7788</MGR>
        <HIREDATE>23-MAY-87</HIREDATE>
        <SAL>1100</SAL>
        <DEPTNO>20</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7900</EMPNO>
        <ENAME>JAMES</ENAME>
        <JOB>CLERK</JOB>
        <MGR>7698</MGR>
        <HIREDATE>03-DEC-81</HIREDATE>
        <SAL>950</SAL>
        <DEPTNO>30</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7902</EMPNO>
        <ENAME>FORD</ENAME>
        <JOB>ANALYST</JOB>
        <MGR>7566</MGR>
        <HIREDATE>03-DEC-81</HIREDATE>
        <SAL>3000</SAL>
        <DEPTNO>20</DEPTNO>
      </ROW>
      <ROW>
        <EMPNO>7934</EMPNO>
        <ENAME>MILLER</ENAME>
        <JOB>CLERK</JOB>
        <MGR>7782</MGR>
        <HIREDATE>23-JAN-82</HIREDATE>
        <SAL>1300</SAL>
        <DEPTNO>10</DEPTNO>
      </ROW>
    </ROWSET>
  </EMP>
  <DEPT>
    <ROWSET>
      <ROW>
        <DEPTNO>10</DEPTNO>
        <DNAME>ACCOUNTING</DNAME>
        <LOC>NEW YORK</LOC>
      </ROW>
      <ROW>
        <DEPTNO>20</DEPTNO>
        <DNAME>RESEARCH</DNAME>
        <LOC>DALLAS</LOC>
      </ROW>
      <ROW>
        <DEPTNO>30</DEPTNO>
        <DNAME>SALES</DNAME>
        <LOC>CHICAGO</LOC>
      </ROW>
      <ROW>
        <DEPTNO>40</DEPTNO>
        <DNAME>OPERATIONS</DNAME>
        <LOC>BOSTON</LOC>
      </ROW>
    </ROWSET>
  </DEPT>
</Schema>Generate something like this...
SQL> select xmlElement
  2         (
  3            "Schema",
  4            xmlAttributes(USER as "dbSchema"),
  5            xmlElement
  6            (
  7              "TABLE",
  8              xmlAttributes('EMP' as "name"),
  9              ( select XMLAGG( XMLELEMENT ("ROW", XMLCOLATTVAL ( EMPNO, ENAME, JOB, MGR, HIREDAT
10            ),
11            xmlElement
12            (
13              "TABLE",
14              xmlAttributes('EMP' as "name"),
15              ( select XMLAGG( XMLELEMENT ("ROW", XMLCOLATTVAL( DEPTNO, DNAME, LOC))) from DEPT
16            )
17         ).extract('/*')
18    from DUAL
19  /
<Schema dbSchema="SCOTT">
  <TABLE name="EMP">
    <ROW>
      <column name="EMPNO">7369</column>
      <column name="ENAME">SMITH</column>
      <column name="JOB">CLERK</column>
      <column name="MGR">7902</column>
      <column name="HIREDATE">1980-12-17</column>
      <column name="SAL">800</column>
      <column name="COMM"/>
      <column name="DEPTNO">20</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7499</column>
      <column name="ENAME">ALLEN</column>
      <column name="JOB">SALESMAN</column>
      <column name="MGR">7698</column>
      <column name="HIREDATE">1981-02-20</column>
      <column name="SAL">1600</column>
      <column name="COMM">300</column>
      <column name="DEPTNO">30</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7521</column>
      <column name="ENAME">WARD</column>
      <column name="JOB">SALESMAN</column>
      <column name="MGR">7698</column>
      <column name="HIREDATE">1981-02-22</column>
      <column name="SAL">1250</column>
      <column name="COMM">500</column>
      <column name="DEPTNO">30</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7566</column>
      <column name="ENAME">JONES</column>
      <column name="JOB">MANAGER</column>
      <column name="MGR">7839</column>
      <column name="HIREDATE">1981-04-02</column>
      <column name="SAL">2975</column>
      <column name="COMM"/>
      <column name="DEPTNO">20</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7654</column>
      <column name="ENAME">MARTIN</column>
      <column name="JOB">SALESMAN</column>
      <column name="MGR">7698</column>
      <column name="HIREDATE">1981-09-28</column>
      <column name="SAL">1250</column>
      <column name="COMM">1400</column>
      <column name="DEPTNO">30</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7698</column>
      <column name="ENAME">BLAKE</column>
      <column name="JOB">MANAGER</column>
      <column name="MGR">7839</column>
      <column name="HIREDATE">1981-05-01</column>
      <column name="SAL">2850</column>
      <column name="COMM"/>
      <column name="DEPTNO">30</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7782</column>
      <column name="ENAME">CLARK</column>
      <column name="JOB">MANAGER</column>
      <column name="MGR">7839</column>
      <column name="HIREDATE">1981-06-09</column>
      <column name="SAL">2450</column>
      <column name="COMM"/>
      <column name="DEPTNO">10</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7788</column>
      <column name="ENAME">SCOTT</column>
      <column name="JOB">ANALYST</column>
      <column name="MGR">7566</column>
      <column name="HIREDATE">1987-04-19</column>
      <column name="SAL">3000</column>
      <column name="COMM"/>
      <column name="DEPTNO">20</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7839</column>
      <column name="ENAME">KING</column>
      <column name="JOB">PRESIDENT</column>
      <column name="MGR"/>
      <column name="HIREDATE">1981-11-17</column>
      <column name="SAL">5000</column>
      <column name="COMM"/>
      <column name="DEPTNO">10</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7844</column>
      <column name="ENAME">TURNER</column>
      <column name="JOB">SALESMAN</column>
      <column name="MGR">7698</column>
      <column name="HIREDATE">1981-09-08</column>
      <column name="SAL">1500</column>
      <column name="COMM">0</column>
      <column name="DEPTNO">30</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7876</column>
      <column name="ENAME">ADAMS</column>
      <column name="JOB">CLERK</column>
      <column name="MGR">7788</column>
      <column name="HIREDATE">1987-05-23</column>
      <column name="SAL">1100</column>
      <column name="COMM"/>
      <column name="DEPTNO">20</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7900</column>
      <column name="ENAME">JAMES</column>
      <column name="JOB">CLERK</column>
      <column name="MGR">7698</column>
      <column name="HIREDATE">1981-12-03</column>
      <column name="SAL">950</column>
      <column name="COMM"/>
      <column name="DEPTNO">30</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7902</column>
      <column name="ENAME">FORD</column>
      <column name="JOB">ANALYST</column>
      <column name="MGR">7566</column>
      <column name="HIREDATE">1981-12-03</column>
      <column name="SAL">3000</column>
      <column name="COMM"/>
      <column name="DEPTNO">20</column>
    </ROW>
    <ROW>
      <column name="EMPNO">7934</column>
      <column name="ENAME">MILLER</column>
      <column name="JOB">CLERK</column>
      <column name="MGR">7782</column>
      <column name="HIREDATE">1982-01-23</column>
      <column name="SAL">1300</column>
      <column name="COMM"/>
      <column name="DEPTNO">10</column>
    </ROW>
  </TABLE>
  <TABLE name="EMP">
    <ROW>
      <column name="DEPTNO">10</column>
      <column name="DNAME">ACCOUNTING</column>
      <column name="LOC">NEW YORK</column>
    </ROW>
    <ROW>
      <column name="DEPTNO">20</column>
      <column name="DNAME">RESEARCH</column>
      <column name="LOC">DALLAS</column>
    </ROW>
    <ROW>
      <column name="DEPTNO">30</column>
      <column name="DNAME">SALES</column>
      <column name="LOC">CHICAGO</column>
    </ROW>
    <ROW>
      <column name="DEPTNO">40</column>
      <column name="DNAME">OPERATIONS</column>
      <column name="LOC">BOSTON</column>
    </ROW>
  </TABLE>
</Schema>
SQL>Given the first form the query is something like this....
SQL> column TABLE_NAME format A32
SQL> column COLUMN_NAME format A32
SQL> column VALUE format A32
SQL> --
SQL> select value(t).getRootElement() TABLE_NAME,
2 value(c).getRootElement() COLUMN_NAME,
3 extractValue(value(c),'/*/text()') VALUE
4 from (
5 select xmlElement
6 (
7 "Schema",
8 xmlElement
9 (
10 "EMP",
11 dbms_xmlgen.getXMLTYPE('select * from EMP')
12 ),
13 xmlElement
14 (
15 "DEPT",
16 dbms_xmlgen.getXMLType('select * from DEPT')
17 )
18 ) MYXML
19 from DUAL
20 ),
21 table(xmlsequence(extract(MYXML,'/Schema/*'))) T,
22 table(xmlsequence(extract(value(T),'/*/ROWSET/*'))) R,
23 table(xmlsequence(extract(value(R),'/ROW/*'))) C
24 /
TABLE_NAME COLUMN_NAME VALUE
EMP EMPNO 7369
EMP ENAME SMITH
EMP JOB CLERK
EMP MGR 7902
EMP HIREDATE 17-DEC-80
EMP SAL 800
EMP DEPTNO 20
EMP EMPNO 7499
EMP ENAME ALLEN
EMP JOB SALESMAN
EMP MGR 7698
EMP HIREDATE 20-FEB-81
EMP SAL 1600
EMP COMM 300
EMP DEPTNO 30
EMP EMPNO 7521
EMP ENAME WARD
EMP JOB SALESMAN
EMP MGR 7698
EMP HIREDATE 22-FEB-81
EMP SAL 1250
EMP COMM 500
EMP DEPTNO 30
EMP EMPNO 7566
EMP ENAME JONES
EMP JOB MANAGER
EMP MGR 7839
EMP HIREDATE 02-APR-81
EMP SAL 2975
EMP DEPTNO 20
EMP EMPNO 7654
EMP ENAME MARTIN
EMP JOB SALESMAN
EMP MGR 7698
EMP HIREDATE 28-SEP-81
EMP SAL 1250
EMP COMM 1400
EMP DEPTNO 30
EMP EMPNO 7698
EMP ENAME BLAKE
EMP JOB MANAGER
EMP MGR 7839
EMP HIREDATE 01-MAY-81
EMP SAL 2850
EMP DEPTNO 30
EMP EMPNO 7782
EMP ENAME CLARK
EMP JOB MANAGER
EMP MGR 7839
EMP HIREDATE 09-JUN-81
EMP SAL 2450
EMP DEPTNO 10
EMP EMPNO 7788
EMP ENAME SCOTT
EMP JOB ANALYST
EMP MGR 7566
EMP HIREDATE 19-APR-87
EMP SAL 3000
EMP DEPTNO 20
EMP EMPNO 7839
EMP ENAME KING
EMP JOB PRESIDENT
EMP HIREDATE 17-NOV-81
EMP SAL 5000
EMP DEPTNO 10
EMP EMPNO 7844
EMP ENAME TURNER
EMP JOB SALESMAN
EMP MGR 7698
EMP HIREDATE 08-SEP-81
EMP SAL 1500
EMP COMM 0
EMP DEPTNO 30
EMP EMPNO 7876
EMP ENAME ADAMS
EMP JOB CLERK
EMP MGR 7788
EMP HIREDATE 23-MAY-87
EMP SAL 1100
EMP DEPTNO 20
EMP EMPNO 7900
EMP ENAME JAMES
EMP JOB CLERK
EMP MGR 7698
EMP HIREDATE 03-DEC-81
EMP SAL 950
EMP DEPTNO 30
EMP EMPNO 7902
EMP ENAME FORD
EMP JOB ANALYST
EMP MGR 7566
EMP HIREDATE 03-DEC-81
EMP SAL 3000
EMP DEPTNO 20
EMP EMPNO 7934
EMP ENAME MILLER
EMP JOB CLERK
EMP MGR 7782
EMP HIREDATE 23-JAN-82
EMP SAL 1300
EMP DEPTNO 10
DEPT DEPTNO 10
DEPT DNAME ACCOUNTING
DEPT LOC NEW YORK
DEPT DEPTNO 20
DEPT DNAME RESEARCH
DEPT LOC DALLAS
DEPT DEPTNO 30
DEPT DNAME SALES
DEPT LOC CHICAGO
DEPT DEPTNO 40
DEPT DNAME OPERATIONS
DEPT LOC BOSTON
113 rows selected.
SQL>
SQL> select extractValue(value(t),'/Table/@name') TABLE_NAME,
2 extractValue(value(c),'/column/@name') TABLE_NAME,
3 extractValue(value(c),'/column/text()') VALUE
4 from (
5 select xmlElement
6 (
7 "Schema",
8 xmlAttributes(USER as "dbSchema"),
9 xmlElement
10 (
11 "Table",
12 xmlAttributes('EMP' as "name"),
13 ( select XMLAGG( XMLELEMENT ("ROW", XMLCOLATTVAL ( EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTN
14 ),
15 xmlElement
16 (
17 "Table",
18 xmlAttributes('EMP' as "name"),
19 ( select XMLAGG( XMLELEMENT ("ROW", XMLCOLATTVAL( DEPTNO, DNAME, LOC))) from DEPT )
20 )
21 ) MYXML
22 from DUAL
23 ),
24 table(xmlsequence(extract(MYXML,'/Schema/Table'))) T,
25 table(xmlsequence(extract(value(T),'/Table/ROW'))) R,
26 table(xmlsequence(extract(value(R),'/ROW/column'))) C
27 /
TABLE_NAME TABLE_NAME VALUE
EMP EMPNO 7369
EMP ENAME SMITH
EMP JOB CLERK
EMP MGR 7902
EMP HIREDATE 1980-12-17
EMP SAL 800
EMP COMM
EMP DEPTNO 20
EMP EMPNO 7499
EMP ENAME ALLEN
EMP JOB SALESMAN
EMP MGR 7698
EMP HIREDATE 1981-02-20
EMP SAL 1600
EMP COMM 300
EMP DEPTNO 30
EMP EMPNO 7521
EMP ENAME WARD
EMP JOB SALESMAN
EMP MGR 7698
EMP HIREDATE 1981-02-22
EMP SAL 1250
EMP COMM 500
EMP DEPTNO 30
EMP EMPNO 7566
EMP ENAME JONES
EMP JOB MANAGER
EMP MGR 7839
EMP HIREDATE 1981-04-02
EMP SAL 2975
EMP COMM
EMP DEPTNO 20
EMP EMPNO 7654
EMP ENAME MARTIN
EMP JOB SALESMAN
EMP MGR 7698
EMP HIREDATE 1981-09-28
EMP SAL 1250
EMP COMM 1400
EMP DEPTNO 30
EMP EMPNO 7698
EMP ENAME BLAKE
EMP JOB MANAGER
EMP MGR 7839
EMP HIREDATE 1981-05-01
EMP SAL 2850
EMP COMM
EMP DEPTNO 30
EMP EMPNO 7782
EMP ENAME CLARK
EMP JOB MANAGER
EMP MGR 7839
EMP HIREDATE 1981-06-09
EMP SAL 2450
EMP COMM
EMP DEPTNO 10
EMP EMPNO 7788
EMP ENAME SCOTT
EMP JOB ANALYST
EMP MGR 7566
EMP HIREDATE 1987-04-19
EMP SAL 3000
EMP COMM
EMP DEPTNO 20
EMP EMPNO 7839
EMP ENAME KING
EMP JOB PRESIDENT
EMP MGR
EMP HIREDATE 1981-11-17
EMP SAL 5000
EMP COMM
EMP DEPTNO 10
EMP EMPNO 7844
EMP ENAME TURNER
EMP JOB SALESMAN
EMP MGR 7698
EMP HIREDATE 1981-09-08
EMP SAL 1500
EMP COMM 0
EMP DEPTNO 30
EMP EMPNO 7876
EMP ENAME ADAMS
EMP JOB CLERK
EMP MGR 7788
EMP HIREDATE 1987-05-23
EMP SAL 1100
EMP COMM
EMP DEPTNO 20
EMP EMPNO 7900
EMP ENAME JAMES
EMP JOB CLERK
EMP MGR 7698
EMP HIREDATE 1981-12-03
EMP SAL 950
EMP COMM
EMP DEPTNO 30
EMP EMPNO 7902
EMP ENAME FORD
EMP JOB ANALYST
EMP MGR 7566
EMP HIREDATE 1981-12-03
EMP SAL 3000
EMP COMM
EMP DEPTNO 20
EMP EMPNO 7934
EMP ENAME MILLER
EMP JOB CLERK
EMP MGR 7782
EMP HIREDATE 1982-01-23
EMP SAL 1300
EMP COMM
EMP DEPTNO 10
EMP DEPTNO 10
EMP DNAME ACCOUNTING
EMP LOC NEW YORK
EMP DEPTNO 20
EMP DNAME RESEARCH
EMP LOC DALLAS
EMP DEPTNO 30
EMP DNAME SALES
EMP LOC CHICAGO
EMP DEPTNO 40
EMP DNAME OPERATIONS
EMP LOC BOSTON
124 rows selected.
SQL>

Similar Messages

  • 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

  • Not inlcude empty tag while invoking service from ESB

    The ESB receives a request with input xml which contains some empty tag. while ESB invokes the actual services the empty tags should not be included. can any one help how to achieve this?

    define that tag as optional in schema and don't map that element. This should help you.
    -Ramana.

  • XML validation error while parsing MXI Manifest

    Hi,
    I have created an hybrid extension for Photoshop. I want to upload my extension on Adobe Exchange. during the upload process I get an error,
    "XML validation error while parsing MXI Manifest: Declarations can only occur in the doctype declaration. Line: 19 Position: 791 Last 80 unconsumed characters".
    The error description specifies that description in MXI file is not valid. Below are the contents of my MXI file.
    <macromedia-extension
               name="yyy"
               id="com.yyy"
               version="1.0.0"
               type="object"
               requires-restart="true">
              <author name="abcd" />
              <products>
              <product familyname="Photoshop" maxversion="" primary="true" version="12.0"/>  
              </products>
    <description>
              <![CDATA[
    <p><font size="14" color="black"><b>abcd</b> qwertyuioipafgjhkjljljklkjl
    <br><br>
    Open Extension via: Photoshop top menu > Window > Extensions > abcd.
    <br><br>
    Online support at: <a href="http://www.abcd.com/help.php">http://www.abcd.com/help.php</a></font></p>
    <br>]]>
    </description>
    <ui-access>
              </ui-access>
    <license-agreement>
    </license-agreement>
    <files>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.html" products="" source="zxp-support/Description/abcd.html"/>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.png" products="" source="zxp-support/Description/abcd.png"/>
                <file destination="" file-type="CSXS" products="" source="abcd.zxp"/> 
                <file destination="$automate" file-type="plugin" platform="mac" products="Photoshop" source="mac/abcd.plugin"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop32" source="win32/abcd.8li"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop64" source="win64/abcd.8li"/>
    </files>
    </macromedia-extension>
    Can anyone please point out why am I getting the error?
    Thanks

    Hi CarlSun,
    Thanks for the reply. I have made the changes suggested by you.
    I have few queries:
    1.  Can we use attribute "source" in the description tag?
         I have created a local html page and specified it in source attribute. but the Extension Manager CS6 did not render the local html page and displayed      the following:
         No description avaliable. Click the following link for more details.
         "http://www.abcd.html". Is it possible to display a local html page in Extension Manager CS6?
    2. Can I display an image (png) in CDATA under description tag? If yes, then can you please guide me how can I do so?
    3. As suggested in tech notes MXI file must include UTF-8 encoding as header (<?xml version="1.0" encoding="UTF-8"?>). The MXI I am using does      not have this header. Do I need to include the header?
    Thanks

  • Can't get out.print to work with XML jsp tags

    <jsp:scriptlet>
    if(ErrorTrap == true) {
         out.println("<tr><td colspan=\"center\" align=\"center\">There was" an error while processing the form</td></tr>");
         ErrorTrap = false;
    </jsp:scriptlet>
    I can't get this script to work with the XML stype jsp tags. It keeps telling me the <jsp> tags are untermintaed. Is there a special trick to fix this or do I have to use the non-XML type tags?

    Sorry, I didn't mean to put the extra " in the out.println text string. :-/

  • Xml parser Errror  While Depoying

    Hi,
    Iam trying to deploy an ear file which contains some jar files in web-inf/lib such as xerces.jar,soap.jar,saaj-api.jar,dom4j.jar etc.
    In the web.xml we are trying to access some Xml api's as an init param.(web.xml attached).
    While Deploying for tge very first time it works fine , but next time the deployment always fails
    As this a migration frm Weblogic to SAP web AS,in the init method of the servlet we are using system.setproperty for setting these xml files
    in the path. <i>Can this cause any issues .</i>
    <b>How do we do achieve in SAP Web AS..</b>
    The code snippet of the init method is below :
    static MessageFactory msgFactory = null;
    public void initSystemProperties(ServletConfig servletConfig) {
    String paramName = null;
    String paramValue = null;
    Enumeration enum = servletConfig.getInitParameterNames
    while(enum.hasMoreElements()){
    paramName = (String)enum.nextElement();
    if(paramName != null){
    paramValue =
    servletConfig.getInitParameter(paramName);
    if(paramValue !=null){
    System.setProperty
    (paramName,paramValue);
    //Initialize global variables
    public void init(ServletConfig servletConfig) throws
    ServletException {
    super.init(servletConfig);
    try {
    initSystemProperties(servletConfig);
    // Initialize it to the default.
    msgFactory = MessageFactory.newInstance();
    } catch (SOAPException ex) {
    throw new ServletException("Unable to create
    message factory" + ex.getMessage());
    The deployment gets aborted with the following error.
    <!LOGHEADER[START]/>
    <!HELP[Manual modification of the header may cause parsing problem!]/>
    <!LOGGINGVERSION[1.5.3.7181 - 630_SP]/>
    <!NAME[C:\usr\sap\J2E\JC00\SDM\program\log\sdmcl20060222091333.log]/>
    <!PATTERN[sdmcl20060222091333.log]/>
    <!FORMATTER[com.sap.tc.logging.TraceFormatter(%24d %s: %m)]/>
    <!ENCODING[Cp1252]/>
    <!LOGHEADER[END]/>
    Feb 22, 2006 2:43:35 PM Info: -
    Starting deployment -
    Feb 22, 2006 2:43:35 PM Info: Loading selected archives...
    Feb 22, 2006 2:43:35 PM Info: Loading archive 'C:\usr\sap\J2E\JC00
    \SDM\program\temp\temp52339ComXLApp.ear'
    Feb 22, 2006 2:43:37 PM Info: Selected archives successfully loaded.
    Feb 22, 2006 2:43:37 PM Info: Actions per selected component:
    Feb 22, 2006 2:43:37 PM Info: Update: Selected development
    component 'ComXLApp'/'sap.com'/'localhost'/'2006.02.22.14.42.37'
    updates currently deployed development
    component 'ComXLApp'/'sap.com'/'localhost'/'2006.02.22.14.25.01'.
    Feb 22, 2006 2:43:37 PM Error: Unable to compare host[sap09r0] and host
    [dev-d-com-09qr] Throwable: java.net.UnknownHostException Throwable
    message: dev-d-com-09qr
    Feb 22, 2006 2:43:37 PM Info: Saved current Engine state.
    Feb 22, 2006 2:43:37 PM Info: Error handling strategy: OnErrorStop
    Feb 22, 2006 2:43:37 PM Info: Update strategy: UpdateAllVersions
    Feb 22, 2006 2:43:37 PM Info: Starting: Update: Selected development
    component 'ComXLApp'/'sap.com'/'localhost'/'2006.02.22.14.42.37'
    updates currently deployed development
    component 'ComXLApp'/'sap.com'/'localhost'/'2006.02.22.14.25.01'.
    Feb 22, 2006 2:43:37 PM Info: SDA to be deployed: C:\usr\sap\J2E\JC00
    \SDM\root\origin\sap.com\ComXLApp\localhost\2006.02.22.14.42.37
    \temp52339ComXLApp.ear
    Feb 22, 2006 2:43:37 PM Info: Software type of SDA: J2EE
    Feb 22, 2006 2:43:37 PM Info: ***** Begin of SAP J2EE Engine Deployment
    (J2EE Application) *****
    Feb 22, 2006 2:43:39 PM Error: Unable to compare host[sap09r0] and host
    [dev-d-com-09qr] Throwable: java.net.UnknownHostException Throwable
    message: dev-d-com-09qr
    Feb 22, 2006 2:44:55 PM Info: Begin of log messages of the target
    system:
    06/02/22 14:43:37 -
    06/02/22 14:43:39 - Start updating EAR file...
    06/02/22 14:43:39 - start-up mode is lazy
    06/02/22 14:43:43 - EAR file updated successfully for 3547ms.
    06/02/22 14:43:43 - Start updating...
    06/02/22 14:43:46 - EAR file uploaded to server for 2906ms.
    06/02/22 14:44:55 - ERROR: Not updated. Deploy Service returned ERROR:
    java.rmi.RemoteException: Cannot deploy application sap.com/ComXLApp..
    Reason: Exception during generation of components of application
    sap.com/ComXLApp in container servlet_jsp.; nested exception is:
    com.sap.engine.services.deploy.exceptions.ServerDeploymentException:
    Exception during generation of components of application
    sap.com/ComXLApp in container servlet_jsp.
    at com.sap.engine.services.deploy.server.DeployServiceImpl.update
    (DeployServiceImpl.java:592)
    at
    com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch
    (DeployServiceImplp4_Skel.java:1278)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal
    (DispatchImpl.java:294)
    at com.sap.engine.services.rmi_p4.DispatchImpl._run
    (DispatchImpl.java:183)
    at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request
    (P4SessionProcessor.java:119)
    at
    com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
    at
    com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
    at com.sap.engine.core.thread.impl3.ActionObject.run
    (ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute
    (SingleThread.java:94)
    at com.sap.engine.core.thread.impl3.SingleThread.run
    (SingleThread.java:162)
    Caused by:
    com.sap.engine.services.deploy.exceptions.ServerDeploymentException:
    Exception during generation of components of application
    sap.com/ComXLApp in container servlet_jsp.
    at
    com.sap.engine.services.deploy.server.application.UpdateTransaction.makeComponents(UpdateTransaction.java:391)
    at
    com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)
    at
    com.sap.engine.services.deploy.server.application.UpdateTransaction.begin(UpdateTransaction.java:148)
    at
    com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
    at
    com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
    at
    com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3033)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.update
    (DeployServiceImpl.java:580)
    ... 10 more
    Caused by: javax.xml.parsers.FactoryConfigurationError: Provider
    org.apache.xerces.jaxp.SAXParserFactoryImpl not found
    at javax.xml.parsers.SAXParserFactory.newInstance
    (SAXParserFactory.java:93)
    at com.sap.dictionary.database.dbs.XmlExtractor.createXmlExtractor
    (XmlExtractor.java:49)
    at com.sap.dictionary.database.dbs.XmlExtractor.<init>
    (XmlExtractor.java:30)
    at com.sap.dictionary.database.catalog.DbGeneralStructure.<init>
    (DbGeneralStructure.java:84)
    at com.sap.dictionary.database.catalog.XmlCatalogReader.getTable
    (XmlCatalogReader.java:90)
    at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable
    (BufferedCatalogReader.java:126)
    at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable
    (BufferedCatalogReader.java:89)
    at com.sap.sql.sqlparser.CheckColAndTabVisitor.checkTabs
    (CheckColAndTabVisitor.java:247)
    at com.sap.sql.sqlparser.CheckColAndTabVisitor.performCatalogChecks
    (CheckColAndTabVisitor.java:170)
    at com.sap.sql.sqlparser.CommonSQLStatement.checkSemantics
    (CommonSQLStatement.java:183)
    at com.sap.sql.jdbc.common.StatementAnalyzerImpl.check
    (StatementAnalyzerImpl.java:42)
    at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement
    (StatementAnalyzerImpl.java:126)
    at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement
    (StatementAnalyzerImpl.java:109)
    at com.sap.sql.jdbc.common.CommonPreparedStatement.<init>
    (CommonPreparedStatement.java:155)
    at com.sap.sql.jdbc.common.CommonConnectionImpl.prepareStatement
    (CommonConnectionImpl.java:314)
    at com.sap.engine.services.dbpool.cci.ConnectionHandle.prepareStatement
    (ConnectionHandle.java:81)
    at
    com.sap.engine.services.failover.db.SessionPersistentStorageImpl.deleteAllSessions(SessionPersistentStorageImpl.java:280)
    at
    com.sap.engine.services.failover.storage.DatabasePersistentStorage.deleteAllSessions(DatabasePersistentStorage.java:151)
    at
    com.sap.engine.services.servlets_jsp.server.container.RemoveAction.remove(RemoveAction.java:68)
    at
    com.sap.engine.services.servlets_jsp.server.container.WebContainer.makeUpdate(WebContainer.java:218)
    at
    com.sap.engine.services.deploy.server.application.UpdateTransaction.makeComponents(UpdateTransaction.java:376)
    ... 16 more
    For detailed information see the log file of the Deploy Service.
    06/02/22 14:44:55 -
    regards
    rajesh kr

    Why Do you need to Inntsall JDK . I am using jdk4.2.08 and SAP web AS sp11.
    regards
    rajesh kr

  • XML ACTION TAG "CREATE"

    Dear Experts
    By the method mentioned below I able to extract the data in <b>XML format</b>..
    XML Conversion
    CALL TRANSFORMATION id
    SOURCE output = it_pernr
    RESULT XML xml_out.
    APPEND xml_out TO xmltable .
    But the applicaton where I need to upload this data is looking for action tag "<b><u>CREATE</u></b>".
    <b><i>How can I pass action tag while creating XML file?</i></b>
    Looking forward for a usual working solution from you guys, your kind efforts will be highly appreciated and off-course rewards points for the answers...
    Best Regards
    Aslam Riaz

    Dear Raja,
    I applied the code and this the out come.
      <?xml version="1.0" encoding="iso-8859-1" ?>
    - <FLIGHTS>
    - <item>
      <MANDT>900</MANDT>
    <b>  <CARRID ACTION="CREATE">LH</CARRID> </b>
      <CONNID>0400</CONNID>
      <FLDATE>0000-00-00</FLDATE>
      <PRICE>0.00</PRICE>
      <CURRENCY>USD</CURRENCY>
      <SEATSMAX>0</SEATSMAX>
      <SEATSOCC>0</SEATSOCC>
      <PAYMENTSUM>0.00</PAYMENTSUM>
      <SEATSMAX_B>0</SEATSMAX_B>
      <SEATSOCC_B>0</SEATSOCC_B>
      <SEATSMAX_F>0</SEATSMAX_F>
      <SEATSOCC_F>0</SEATSOCC_F>
      </item>
    What Required is;
      <?xml version="1.0" encoding="UTF-8" ?>
    - <DOCUMENT>
    - <USER ACTIONS="CREATE">
      <USERID>AR0001</USERID>
      <PASSWORD>abnamro</PASSWORD>
      <FNAME>Alvarez</FNAME>
      <GNAME>Eduardo</GNAME>
      <OTHERNAME />
      <PERSONTITLE />
      <LEVEL1>GTA</LEVEL1>
      <LEVEL1DESC>GTA</LEVEL1DESC>
      <LEVEL2>LatAm</LEVEL2>
      <LEVEL2DESC>LatAm</LEVEL2DESC>
      <LEVEL3>Argentina</LEVEL3>
      <LEVEL3DESC>Argentina</LEVEL3DESC>
      <LEVEL4>TradeSupport</LEVEL4>
      <LEVEL4DESC>Trade Support</LEVEL4DESC>
      <LEVEL5 />
      <LEVEL5DESC />
      <EMPNO />
      <ADDRESS1>Buenos Aires</ADDRESS1>
      <ADDRESS2>Argentina</ADDRESS2>
      <EMAIL>[email protected]</EMAIL>
      <PHONE />
      <STATUS>0</STATUS>
      <CURRENTPID>AR0001</CURRENTPID>
      <DAPPRAISER />
      <JOINDATE />
      <USERATTR1 />
      <USERATTR2 />
      <USERATTR3 />
      <USERATTR4 />
      <USERROLE>S</USERROLE>
      <JOBTITLE>CTO</JOBTITLE>
      <CATID>25</CATID>
      <LANGPREF>1</LANGPREF>
      <UI>30</UI>
      <PREF1 />
      <PREF2 />
      <CONTENTSERVER />
      <ICONSELECTOR />
      <INITIALURL />
      <EXTAUTHENTICATION />
      </USER>
    - <USER ACTIONS="CREATE">
      <USERID>AR0002</USERID>
      <PASSWORD>abnamro</PASSWORD>
      <FNAME>Belmudes</FNAME>
      <GNAME>Julio Luis</GNAME>
      <OTHERNAME />
      <PERSONTITLE />
      <LEVEL1>GTA</LEVEL1>
      <LEVEL1DESC>GTA</LEVEL1DESC>
      <LEVEL2>LatAm</LEVEL2>
      <LEVEL2DESC>LatAm</LEVEL2DESC>
      <LEVEL3>Argentina</LEVEL3>
      <LEVEL3DESC>Argentina</LEVEL3DESC>
      <LEVEL4>Sales</LEVEL4>
      <LEVEL4DESC>Sales</LEVEL4DESC>
      <LEVEL5 />
      <LEVEL5DESC />
      <EMPNO />
      <ADDRESS1>Buenos Aires</ADDRESS1>
      <ADDRESS2>Argentina</ADDRESS2>
      <EMAIL />
      <PHONE />
      <STATUS>0</STATUS>
      <CURRENTPID>AR0002</CURRENTPID>
      <DAPPRAISER />
      <JOINDATE />
      <USERATTR1 />
      <USERATTR2 />
      <USERATTR3 />
      <USERATTR4 />
      <USERROLE>S</USERROLE>
      <JOBTITLE />
      <CATID>25</CATID>
      <LANGPREF>1</LANGPREF>
      <UI>30</UI>
      <PREF1 />
      <PREF2 />
      <CONTENTSERVER />
      <ICONSELECTOR />
      <INITIALURL />
      <EXTAUTHENTICATION />
      </USER>
    Best Regards

  • How to remove tags (not color tags)

    How to remove tags (not color tags)
    I love the idea of the tags, however there comes a point when some become irrelevant.  How can I remove them.  I highlighting them in the dialogue box and hitting the delete key, that does not work.  ?

    I accidentally found that you can remove some tags while in the Sidebar view by just draggng them to the trash.
    But after a certain point when you have drug all of tags in the list, you are then left with the "All Tags" button. When you click on that final button, you find that all of the tags you have ever created are still there in the All Tags category. So I guess what I do is just not create any new tags because the list just becomes too long to be useable. I liked the idea of Tags as a management tool, but like so many times before I will just go back to the file name workarounds that I have been using since 1988.  They work because they were developed and tested by an actual user, me.  Just toss a project number into the file name.  Works every time, unlike the undocumented "features" that are apparently not tested.
    But, if what I hear is true that Apple does not monitor these discussions, what was the point of writing this.
    Would like to think they would look at these "discussions" as a resource, but.......

  • Need a quicker way to strip most html tag while retaining a few.

    I have to strip the majority of non plane text (html, javascript, css) from a file whilst retaining the html tags I want.
    I have found many solutions for stripping ALL of the tags but not for stripping most whilst retaining a few.
    I first looked at regular expressions but I could not find a solution that didnt involve specifying all the tags I want removed insted of just listing all the tags I want to keep.
    I had something like this> str.replaceAll("\\<+?(^p|^th|^tr|^td|^h2|^h3|^h4|^li).+?\\>","") but it does not work.
    A regular expression would be great but I could not find one so I coded my own solution.
    The code below goes through each tag (both start and end tags) and strips it from the string if it is not a wanted tag.
    private void stripTags(int startIndex){
              int startArrow = 0;
              int endArrow = 0;
              while(true){
                   startArrow = text.indexOf("<", startIndex);
                   endArrow = text.indexOf(">", startArrow+1);
                   //reached EOF?
                   if(startArrow == -1 || endArrow == -1)   return; // return -1; 
                   if(text.substring(startArrow+1, startArrow+2).equals("/")){
                        //deal with the end tag
                        if(isWantedTag(text.substring(startArrow+2, startArrow+4))) {
                             startIndex = endArrow+1;
                        } else {
                             //remove the tag
                             text = text.substring(0, startArrow).concat(text.substring(endArrow+1, text.length()));
                             startIndex = startArrow;
                   } else {
                        //deal with the start tag
                        if(isWantedTag(text.substring(startArrow+1, startArrow+3))){
                             //remove tag parameters
                             if(endArrow-(startArrow+2) > 1) text = text.substring(0, startArrow+3).concat(text.substring(endArrow, text.length()));
                             startIndex = text.indexOf(">", startArrow+1)+1;
                        } else {
                             //remove the tag
                             text = text.substring(0, startArrow).concat(text.substring(endArrow+1, text.length()));
                             startIndex = startArrow;
    private boolean isWantedTag(String tag){
              return (tag.equals("p>") || tag.equals("p ") || tag.equals("th") || tag.equals("tr") || tag.equals("td") || tag.equals("h2") || tag.equals("h3") || tag.equals("h4") || tag.equals("li"));
         }The problem is that this code is taking ages to run. It takes about 10 seconds to run this method on a very large html file. I need a solution that takes only a 10th of that time.
    Does anybody have a regExp that could do the job or a more efficient version on my tag stripper above?
    Thanks in advance

    I suggest the following template:
    int copyFrom = 0;
    StringBuilder sb = new StringBuilder();
    while (copyFrom < text.length()) {
        int copyTo = findStartTag(text, copyFrom);
        sb.append(text, copyFrom, copyTo);
        copyFrom = findEndTag(text, copyTo + 1);
    text = sb.toString();where findStartTag(String s, int offset) returns the index of the next start tag in s, starting search at offset. It should return s.length() rather than -1 if nothing is found. findEndTag is similar.
    Sorry, that's obviously wrong since you don't want to remove everything between the tags, just the tags themselves. The basic idea is the same, though:
    int copyFrom = 0;
    StringBuilder sb = new StringBuilder();
    while (copyFrom < text.length()) {
        int copyTo = findStartOfTagToRemove(text, copyFrom);
        sb.append(text, copyFrom, copyTo);
        copyFrom = findEndOfTagToRemove(text, copyTo) + 1;
    text = sb.toString();Here, findStartOfTagToRemove finds the position of the '<' character of the next tag to remove.
    And findEndOfTagToRemove finds the position of the '>' character of that tag.
    Edited by: nygaard on Sep 30, 2008 10:39 AM

  • 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

  • I can't create a new tag while saving a file in Yosemite.

    The title pretty much says it all :-) As I try to type in a new tag while saving a file, the curser just blinks, and doesn't respond.  I can't create a new tag. I can click on existing tags, and they get added to the file, but the support page on tags says:
    To add a tag:
    Click on a recent tag that appears in the menu to link it your document. You can even add multiple tags.
    Click “Show All…” to see the all of the tags you have created. Then, click on a tag to add it.
    You can also add tag by typing. As you type in the Tags field, you’ll see matching suggestions from your existing tags.
    To add a new tag, just type it in the field.
    New tags you create automatically appear in other locations where tags are visible, such as in the Finder sidebar.
    The fourth bullet is the one I'm referring to. I think this might be a bug, but I can't find a way to report it. If it's not a bug, I would really appreciate some guidance.
    Here's some system info:
    MacBook Pro (15-inch, Early 2011)
    Model Identifier: MacBookPro8,2
    Processor Name: Intel Core i7
    Processor Speed: 2.2 GHz
    Number of Processors: 1
    Total Number of Cores: 4
    L2 Cache (per Core): 256 KB
    L3 Cache: 6 MB
    Memory: 8 GB
    Boot ROM Version: MBP81.0047.B27
    SMC Version (system): 1.69f4
    Yosemite version:10.10 (14A389)
    Thank you very sincerely for your time,
    Chris

    What sort of file(s) are you trying to tag while saving?
    Have you tried saving the file first, then tagging it/them afterwards?

  • XML Parser Error while creating Web service Client using JAX RPC

    hello evryone,
    Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
    wscompile -gen:client -d build -classpath build config-wsdl.xml
    here im getting Error:
    error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
    Please help me out.
    Many thanks in advance,
    Kacee

    Can i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.

  • Xml parsing error while selecting whole result set for sql query

    Hi All,
    I am having xml parsing error while selecting whole query result set. The data is coming fine for default result set of 50 rows.
    My exception is below.
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00234: namespace prefix "xsi" is not declared
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    *31011. 00000 - "XML parsing failed"*
    **Cause: XML parser returned an error while trying to parse the document.*
    **Action: Check if the document to be parsed is valid.*
    My sql query is below that is giving results for default result set of 50 rows.
    select extract(xmlType(clob_xml_colm_name), '//v2:node1//childnode/text()','xmlns:v2="namespace_url"').getStringVal()  from table_name
    My sql developer version is below.
    Java(TM) Platform     1.7.0_04
    Oracle IDE     3.1.07.42
    Versioning Support     3.1.07.42
    My database version is below.
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit
    Please could any one help me urgently as the sql query is supposed to be correct as it is returning query results, but the problem happening when i try to select whole result set.
    Thanks and regards,

    What does the XML look like? It appears that some of the supposed XML stored as a CLOB is not really valid XML. Find the row in the table that is causing your issue and review the "XML" in it.

  • XML Deserialization error while consuming Enterprise service in wd java..

    Hello,
    I am trying to build 2 webdynpro java webdynpro applications which consumes enterprise service for purchase order and another application for Busines partner.
    While i was able to successfully consume the PO service in webdynpro java and get the desired output for PO..i get XML Deserialization error while running appliation for Business Partner..
    These are the details/steps i followed for the Business Partner application:
    1. After creating the model using the enterprise service, i created a service controller from the model to the component controller..
    2. Out of many inputs/output attributes during mapping from model to component controller. i further mapped the context from CC to ViewC.
    3. In the wdDoInit() method, i added the follwing code:
        BPCreate model1 = new BPCreate();
        Request_BusinessPartnerERPCreateRequestConfirmation_In RequestC = new  Request_BusinessPartnerERPCreateRequestConfirmation_In(model1);
        BPERPCrteReqMsg_S CreateMessage = new BPERPCrteReqMsg_S(model1);
        BPERPCrteReq_SBP Cpartner = new BPERPCrteReq_SBP(model1);
    String Category = new String();
        String lf = new String();
        Cpartner.setInternalID(new String());
        Cpartner.setNumberRangeIntervalBusinessPartnerGroupCode(new String());
        Cpartner.setLifeCycleStatusCode(lf);
        Cpartner.setCategoryCode(Category);   
        CreateMessage.setBusinessPartner(Cpartner);
        RequestC.setBusinessPartnerERPCreateRequestMessage_Sync(CreateMessage);
        wdContext.nodeBusinessPartnerERPCreateRequestMessage_Sync().bind(CreateMessage);
    4. When i comment this code and run the application, the aplication comes up but the input fields are non-editable..
    5. If i place this code in wdDoInit() method, i get the Deserialization error..
    Any idea about why this error occurs and which areas in the application can lead to these errors?
    I checked that the service runs fine in soamanager.
    Thanks, JVR

    Hi Kishore,
    This error is majorly because while executing this Webdynpro application you are not entering all the mandatory fileds of WS.
    Please try to execute this WS from WS-Navigator, check which fileds are mandatory and then
    appropriately instantiate it in wdDoInit and pass all the fields required.
    Regards,
    Vaibhav Modi.

  • HTTP response does not contain a valid XML root tag

    I am running into an error in my trace portion of my XML when executing my application. The error is  "HTTP response does not contain a valid XML root tag". The HTTP request is successful with message 200 so it seems to be accepted by the Integration Engine. I looked for other posts on this error and only found one and it didn't show the resolution. Any help would be appreciated.

    Hello
    Check these notes (do you use a split mapping?):
    1) 1515230     XI mapping: "Root tag missing" in split mapping
    2)  1640553     XI mapping: Split mapping: error Missing_Interface
    Regards
    Mark

Maybe you are looking for