Using XMLQuery with namespace

Hi,
I have following XML document stored as XMLType column,
<ocaStatus xmlns="http://xmlbeans.apache.org/ocastatus"><status><statusCode>934</statusCode><statusDate>Wed Apr 07 16:05:53 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>934</statusCode><statusDate>Wed Apr 07 15:58:25 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>934</statusCode><statusDate>Wed Apr 07 15:54:02 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>750</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Document Metadata is correct.</comment></status><status><statusCode>934</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>932</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Loaded to Novus</comment></status><status><statusCode>700</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Document is deleted from OCA.</comment></status></ocaStatus>
This XML row contains namespace in it. Also there are some XML that does not have any namespace in it.
I am running following XMLQuery() to get statusCode,
select docfamily_uuid,
XMLQuery(
'for $i in /ocaStatus/status
where $i/statusCode = 934
return <statusDate>{$i /statusDate}</statusDate>'
passing document_status_bean RETURNING CONTENT)
from document_status_xml;
Interestingly the query returns null for XML with namespace and statusCode value for rest of the XMLs without any namespace.
Please help me to get this resolved.
Thanks in advanced.
Edited by: user6117359 on Apr 8, 2010 12:17 AM

user6117359 wrote:
I have some XPath queries too which are using extract(). I am facing the similar problem with them.Hi,
Extract() accepts a list of namespaces as its third parameter.
Ex. : based on your sample, to extract the first "status" element :
SELECT extract(document_status_bean, 'ocaStatus/status[1]', 'xmlns="http://xmlbeans.apache.org/ocastatus"')
FROM document_status_xml

Similar Messages

  • Using selectSingleNode with namespace prefixes like "xmlsns:xsi"???

    I'm having a little trouble manipulating a document with the xmlparserv2 library. The XMLNode.selectSingleNode method does not seem to work when the attribute in question is part of a namespace. For example, I have a document that has a schema declaration like so:
    ****CUT****
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="..\XMLStressTestCase.xsl"?>
    <XMLTestCase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../XmlStressTestCase.xsd" Name="Engenious (Switch) Eligible Test" MaxTime="30000">
    ****CUT****
    If I create an XMLDocument (myDoc) from the file in question and try to execute the following line of code
    Node n = myDoc.selectSingleNode("@xmlns:xsi");
    I get the following error
    " Namespace prefix 'xmlns' used but not declared."
    In google I found a thread (http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=ugJD7hJ3BHA.2236%40tkmsftngp02&rnum=2&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dxmlns%2B%252B%2BselectSingleNode%26sa%3DN%26tab%3Dwg)that points to setProperty/selectionNamespaces
    as qa possible way to resolve the problem in the MSXML implementation. It looks like the oracle XDK has the same method, but I can't seem to find any documentation on the values that are supported for that method (http://otn.oracle.com/docs/tech/xml/xdk_java/doc_library/Production9i/doc/java/javadoc/oracle/xml/parser/v2/XMLNode.html#setProperty(java.lang.String, java.lang.Object))
    Any help? Should I be declaring the namespace in my XML someplace?

    In fact it used to be possible to set a NamespacePrefixMapper that controls the namespace prefixes in the JAXB 2.0 from Glasfish like this:
    marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", new MyNamespacePrefixMapper());
    When using the Java 6 implementation of JAXB this coded will throw an exception. Has anyone got a clue how to control the namespace prefix in Java 6?
    Thanks,
    Ager

  • How use xml with namespaces

    I have the following xml which is output from Oracle Bpel.
    <OglRapportPerAdresnrResponse xmlns="http://www.itude.com/technology/Ogl/RapportPerAdresnrResponse">
    <AdresGegevens>
    <Adresnr>54321</Adresnr>
    <Straatkode>12345</Straatkode>
    </AdresGegevens>
    </OglRapportPerAdresnrResponse>
    If i remove the namespace info everything works fine but with the namespace info the output is empty if i insert e.g. <Adresnr> into a template. The field browser shows everything fine and also the value but when rendering a PDF it disappears. I read in the user guide that i need to declare the namspace in a form field like <?namespace:namespace name= namespace url?> but how do i do that with the above namespace notation where the namespace name is empty ?
    Regards,
    Andre

    Hi Tim,
    I found part of the solution but i am still stuck when i need to use <?for-each?> tags. When i use the following XML:
    <OglRapportPerAdresnrResponse xmlns="http://www.itude.com/technology/Ogl/RapportPerAdresnrResponse">
         <AdresGegevens>
              <Adresnr>8391</Adresnr>
              <Straatkode>11070</Straatkode>
         </AdresGegevens>
         <Basisgegevens>
              <paramPResult xmlns="urn:generated.ws.kgb.itude.com">
                   <paramAdresnr>8391</paramAdresnr>
                   <paramGegevenstype>GEBRUIK</paramGegevenstype>
              </paramPResult>
              <paramPResult xmlns="urn:generated.ws.kgb.itude.com">
                   <paramAdresnr>8391</paramAdresnr>
                   <paramGegevenstype>STADSDEEL</paramGegevenstype>
              </paramPResult>
         </Basisgegevens>
    </OglRapportPerAdresnrResponse>
    I read the xml file in Word. I then have access to the fields but when i select AdresGegevens/Adresnr the output is not rendered. The namespace is a default namespace for that element. I found out that if i define a namespace like <?xmlns:bpel=http://www.itude.com/technology/Ogl/RapportPerAdresnrResponse?> and then access the AdresGegevens/Adresnr through <?bpel:Adresnr?> it works!
    I then defined a second namespace <?xmlns:bpel2=urn:generated.ws.kgb.itude.com?> and tried to render the paramPResult tags with:
    <?for-each:paramPResult?>
    <?bpel2:paramAdresnr?>
    <?bpel2:paramGegevenstype?>
    <?end for-each?>
    But the above does not work. Any ideas?
    Regards,
    Andre Jochems

  • How to use XPath with Namespaces in the xml ?

    Hi all,
    I need to reference a certain Node in a Document using XPath notation.
    The problem is the the XML Document contains Namespaces inside it
    f.e.
    <xn:SubNetwork id="JRANM">
        <xn:VsDataContainer id="1">
           <xn:vsDataType>vsDataAreas</xn:vsDataType>
        </xn:VsDataContainer>
    </xn:SubNetwork >Using DOMXPath (from weblogic.xml.xpath)
      DOMXPath xPath = new DOMXPath("xn:SubNetwork/*");
      Set nodeset = xPath.evaluateAsNodeset(this.xmlRootElement);When I Iterate through the Set I can see it's empty.
    (On the other hand without namespaces everything is fine.)
    So how can I reference a Node that contains a namespace in it ?
    Thanks a lot
    Francesco

    We use the following class to perform XPath Queries on our XmlBean objects.
    Hope this helps,
    Craig
    import java.util.Set;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.apache.xmlbeans.XmlException;
    import org.w3c.dom.Document;
    import weblogic.xml.util.StringInputStream;
    import weblogic.xml.xpath.DOMXPath;
    * Class to encapsulate API specific (i.e. weblogic) XML functions
    public class XmlUtil {
         * Returns a set containing objects of type reflected in the query.<br/>
         * e.g.<br/>
         * /saur:tree/saur:treeNode[@label='My Reports']<br/>
         * Returns a Set of TreeNode objects<br/>
         * Sample Code: <br/>
         * <code>
         * Set set = XmlUtil.executeXPathQuery( myQuery, tree.xmlText());
         * for( Iterator iter = set.iterator(); iter.hasNext();) {
         *     TreeNode node = TreeNode.Factory.parse((Node)iter.next());
         *     // Do whatever...
         * </code>
         * @param query
         * @param xml
         * @return
        public static Set executeXPathSetQuery( String query, String xml) throws XmlException {
            try {
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();   
                factory.setNamespaceAware(true);
                DocumentBuilder builder = factory.newDocumentBuilder();
                StringInputStream in = new StringInputStream(xml);
                Document doc = builder.parse(in);
                DOMXPath xQuery =  new DOMXPath(query);
                return xQuery.evaluateAsNodeset(doc);
            catch(Exception x) {
                throw new XmlException("Error running XPath query", x);
    }

  • Using XSLT to extract value of a XML node with namespace

    I have a XML source code here.
    <?xml version="1.0" encoding="utf-8" ?>
    <rss version="2.0" xmlns:job="http://www.pageuppeople.com">
      <channel>
        <title>SMH Jobs</title>
        <link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
        <description>A listing of jobs available here</description>
        <item>
          <title>eCommerce Optimisation Advisor</title>
          <description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
          <job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
        </item>
      </channel>
    </rss>
    I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.
    <xsl:value-of select="job:location" disable-output-escaping="yes"/>
    <xsl:value-of select="job/location" disable-output-escaping="yes"/>
    <xsl:value-of select="job\location" disable-output-escaping="yes"/>
    <xsl:value-of select="location" disable-output-escaping="yes"/>
    This might be an easy question for you, but I would appreciate if anyone can help.

    Hi Suncorp IT Learner,
    We need to tell the XSLT that some elements are in another namespace. Copy the xmls declarations for the prefixes you need to use. Then use the xsl format as:
    <xsl: value-of select=”job:location/@PUReferenceID”/>
    In following issue, Chriztian has a good explanation:
    http://our.umbraco.org/forum/developers/xslt/33353-XSLT-reading-XML-attribute-value
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Using XPath with SQL to extract XML data

    Given data such as this one:
    <?xml version="1.0"?>
    <ExtendedData>
       <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
    </ExtendedData>I normally use extractValue function as shown below for example to extract the value for the last parameter in the data above, e.g:
    select extractValue(extended_data,'/ExtendedData/Parameter[@name="RealProv"]/BooleanValue') "my_column_alias" from tableAny ideas on how I may return the value of the parameter xsi:nil from this node:
    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>I'd like to extract the true in xsi:nil="true"...
    Thanks,
    Edited by: HouseofHunger on May 15, 2012 2:13 PM
    Edited by: HouseofHunger on May 15, 2012 2:13 PM

    Extractvalue() has a third parameter we can use to declare namespace mappings :
    SQL> with sample_data as (
      2    select xmltype('<?xml version="1.0"?>
      3  <ExtendedData>
      4    <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      5    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      6    <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      7    <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
      8  </ExtendedData>') doc
      9    from dual
    10  )
    11  select extractvalue(
    12           doc
    13         , '/ExtendedData/Parameter[@name="BARRING_PASSWORD"]/@xsi:nil'
    14         , 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
    15         )
    16  from sample_data
    17  ;
    EXTRACTVALUE(DOC,'/EXTENDEDDAT
    true
    If you're on 11.2.0.2 and up, extractvalue() is deprecated.
    One should use XMLCast/XMLQuery instead :
    SQL> with sample_data as (
      2    select xmltype('<?xml version="1.0"?>
      3  <ExtendedData>
      4    <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      5    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      6    <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      7    <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
      8  </ExtendedData>') doc
      9    from dual
    10  )
    11  select xmlcast(
    12           xmlquery('/ExtendedData/Parameter[@name="BARRING_PASSWORD"]/@xsi:nil'
    13            passing doc
    14            returning content
    15           ) as varchar2(5)
    16         )
    17  from sample_data
    18  ;
    XMLCAST(XMLQUERY('/EXTENDEDDAT
    true
    Note : the xsi prefix is predefined when using Oracle XQuery, so in this case we don't have to declare it explicitly.
    Edited by: odie_63 on 15 mai 2012 15:23

  • Xsl transformation from version1 to version2, problem with namespaces

    Guys!
    In my current project we need to have an interface in Oracle ESB which is build on lets say a wsdl version1 and an interface build on wsdl version2.
    In esb i need to define a transformation which will transform the request on version1 to version2. Because the xsd for the operation is really huge (+1000 items) i made some templates in xsl to do most of the work, works great..only i'm having a few issues now.
    To re-order items from source to target i do the next in a template
    <nameGroep>
    <xsl:copy-of select="andhere the xpath from source"/>
    <xsl:copy-of select="andhere the xpath from source"/>
    <xsl:copy-of select="andhere the xpath from source"/>
    </nameGroep>The only problem from the xsl:copy-of is, it also copies the namespace along. So if my target document uses an other namespace, it fails.
    To correct this i hoped i could make use of <xsl:namespace-alias> but this doesn't work on a literal/text tag (hope i explain this correct).
    Other option is, for every element do something like
    [code[
    <elementname>
    <xsl:value-of select=""/>
    </elementname>
    but this will create the <elementname> always in the target whether or not it's in the source. You could do a check to see if it's in the source, but this isn't a solution because then i need to check for every 1000+ item in the source document, so..we skip this idea.
    So i reach a point where im still searching for a good solution and hoped you guys could help me a bit with it.
    If the problem isn't explain well please say so, and i will add extra info.

    Guys!
    In my current project we need to have an interface in Oracle ESB which is build on lets say a wsdl version1 and an interface build on wsdl version2.
    In esb i need to define a transformation which will transform the request on version1 to version2. Because the xsd for the operation is really huge (+1000 items) i made some templates in xsl to do most of the work, works great..only i'm having a few issues now.
    To re-order items from source to target i do the next in a template
    <nameGroep>
    <xsl:copy-of select="andhere the xpath from source"/>
    <xsl:copy-of select="andhere the xpath from source"/>
    <xsl:copy-of select="andhere the xpath from source"/>
    </nameGroep>The only problem from the xsl:copy-of is, it also copies the namespace along. So if my target document uses an other namespace, it fails.
    To correct this i hoped i could make use of <xsl:namespace-alias> but this doesn't work on a literal/text tag (hope i explain this correct).
    Other option is, for every element do something like
    [code[
    <elementname>
    <xsl:value-of select=""/>
    </elementname>
    but this will create the <elementname> always in the target whether or not it's in the source. You could do a check to see if it's in the source, but this isn't a solution because then i need to check for every 1000+ item in the source document, so..we skip this idea.
    So i reach a point where im still searching for a good solution and hoped you guys could help me a bit with it.
    If the problem isn't explain well please say so, and i will add extra info.

  • Problem with compiling STL using program with Forte C++ 6 update 1 in compat mode

    I try to compile SGI STL using program with Forte C++ 6 update 1 and I get an errror
    ld -L/opt/SUNWspro/WS6U1/lib -liostream test.o -o test
    Undefined first referenced
    symbol in file
    __0oNIostream_initctv test.o
    __0oNIostream_initdtv test.o
    Iostream_init - declared as a static class CC4/iostream.h, but nm libiostream.a produce
    __1cNIostream_init2T6M_v_
    __1cNIostream_init2t6M_v_
    and program can't link.
    What's wrong?
    Thank you for any comments

    Hi!
    I experienced the same problem and the solution looks like the following: in sunpro6.mak file there is a variable STL_INCL that has the following value: -I. -I${PWD}/../stlport
    Change that to -I. -I${PWD}/../stlport/SC5 and the problem vanishes. The reason is that stlport/SC5 contains files *.SUNWCCh which are used by SUNpro C++ compiler as standard headers and contain correct STLPort namespace information.
    Regars,
    Art

  • WebDynpro Exception: IDs with Namespace Must Have the Format / namespace /

    Hi Experts,
        Can you please help me with this:
        I get the following error when I execute a webdynpro application.  Can you please let me know where do
        I need to look to verify the <namespace> and <id>.
       Error when processing your request
    What has happened?
    The URL http://sapdev.tfi.local:8000/sap/bc/webdynpro/sap/z_temp_disp_mara/ was not called due to an error.
    Note
    The following error text was processed in the system DEV : WebDynpro Exception: IDs with Namespace Must Have the Format /<namespace>/<id>
    The error occurred on the application server sapdev_DEV_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
    Method: CONSTRUCTOR of program CL_WD_TABLE_COLUMN============CP
    Method: NEW_TABLE_COLUMN of program CL_WD_TABLE_COLUMN============CP
    Method: IF_WDR_VIEW_DELEGATE~WD_CREATE_UI_TREE of program /1BCWDY/6JQCRML58TRPAX42J5MQ==CP
    Method: CREATE_UI_TREE of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DEV in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server sapdev_DEV_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server sapdev_DEV_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Edited by: arshad mohammed on Sep 24, 2009 2:19 AM

    Hello experts,
    i got the same error but we use sap basis 700 with sps 15. What to do here?

  • Add child element by name with namespace

    I'm trying to add element by name that is in namespace. This call
    mod.addAppendStep ( Exp, XmlModify.Element, Name, Text )
    fails with error:
    Error: XmlModify::addStep: Cannot create content for step
    Name in abobe call is "my_ns:elem_name", query context is linked to that namespace (I tried query context not linked to namespace as well).

    If you want to add an element in a namespace, you need to do it using an empty name, and put the element (with namespace decl). E.g.:
    mod.addAppendStep(Exp, XmlModify.Element, "", "<my_ns:elem_name xmlns:my_ns='uri_for_my_ns' />").
    The exception you're seeing is saying that it can't create the content, and the content is created by parsing what is passed in, and <my_ns:elem_name/> is not well-formed (namespace prefix hasn't been mapped).
    Regards,
    George

  • Why XPath didnot work with Namespace ?

    Dear all,
    When I parsing a xml document with Namespace by XPath , it didnot work well , but if I remove the part of Namespace , it worked well , I am not sure if I processed with right steps , any help is appreciated :
    My parser : jdom-b9
    jdk : 1.4.1
    My code is like :
    import java.io.*;
    import java.util.*;
    import org.jdom.*;
    import org.jdom.input.*;
    import org.jdom.output.*;
    import org.jdom.xpath.*;
    public class XPathTest {   
        public static void main(String[] args) throws IOException, JDOMException {
            if (args.length != 1) {
                System.err.println("Usage: samples.XPathTest [test.xml]");
                return;
            String filename = args[0];
            PrintStream out = System.out;
            SAXBuilder builder = new SAXBuilder();
            Document doc = builder.build(new File(filename));
            Element root = doc.getRootElement();          
            XPath path = XPath.newInstance("//Worksheet");          
            path.addNamespace("ss","urn:schemas-microsoft-com:office:spreadsheet");
            // or use :
            //Namespace ns = root.getNamespace();
            //path.addNamespace(ns);
            List elementNames = path.selectNodes(doc);
            if (elementNames.size() == 0) {
                out.println("This xml contains no element <Worksheet>");
            } else {
                out.println("This xml contains " + elementNames.size() + " <Worksheet> :");
                Iterator i = elementNames.iterator();
                while (i.hasNext()) {
                    out.println("\t" + ((Element)i.next()).getName());
    }and test.xml :
    <?xml version="1.0"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <Worksheet ss:Name="Sheet2">
      <Table ss:ExpandedColumnCount="12" ss:ExpandedRowCount="38" x:FullColumns="1"
       x:FullRows="1" ss:DefaultColumnWidth="54" ss:DefaultRowHeight="14.25">
       <Column ss:Width="63"/>
       <Column ss:Width="76.5"/>
       <Column ss:Width="103.5"/>
       <Column ss:Width="123"/>
       <Column ss:Width="136.5"/>
       <Column ss:Width="83.25"/>
       <Column ss:Width="39"/>
       <Column ss:Width="76.5"/>
       <Column ss:Width="103.5"/>
       <Column ss:Width="90"/>
       <Column ss:Width="76.5"/>
       <Column ss:Width="90"/>
       <Row>
        <Cell><Data ss:Type="String">PORT_CODE</Data></Cell>
        <Cell><Data ss:Type="String">EFFECT_DATE</Data></Cell>
        <Cell><Data ss:Type="String">END_DATE</Data></Cell>
        <Cell><Data ss:Type="String">ENCODE_SCHEME_PORT</Data></Cell>
        <Cell><Data ss:Type="String">PORT_NAME</Data></Cell>
        <Cell><Data ss:Type="String">COUNTRY_CODE</Data></Cell>
        <Cell><Data ss:Type="String">IS_RT</Data></Cell>
        <Cell><Data ss:Type="String">DATA_SOURCE</Data></Cell>
        <Cell><Data ss:Type="String">LAST_UPD_DATE</Data></Cell>
        <Cell><Data ss:Type="String">LAST_UPD_USER</Data></Cell>
        <Cell><Data ss:Type="String">BP_UPD_DATE</Data></Cell>
        <Cell><Data ss:Type="String">PROVINCE_CODE</Data></Cell>
       </Row>
      </Table>
    </Worksheet>
    </Workbook>test1.xml
    <?xml version="1.0"?>
    <Workbook>
    <Worksheet Name="Sheet2">
      <Table>
       <Column Width="63"/>
       <Column Width="76.5"/>
       <Column Width="103.5"/>
       <Column Width="123"/>
       <Column Width="136.5"/>
       <Column Width="83.25"/>
       <Column Width="39"/>
       <Column Width="76.5"/>
       <Column Width="103.5"/>
       <Column Width="90"/>
       <Column Width="76.5"/>
       <Column Width="90"/>
       <Row>
        <Cell><Data Type="String">PORT_CODE</Data></Cell>
        <Cell><Data Type="String">EFFECT_DATE</Data></Cell>
        <Cell><Data Type="String">END_DATE</Data></Cell>
        <Cell><Data Type="String">ENCODE_SCHEME_PORT</Data></Cell>
        <Cell><Data Type="String">PORT_NAME</Data></Cell>
        <Cell><Data Type="String">COUNTRY_CODE</Data></Cell>
        <Cell><Data Type="String">IS_RT</Data></Cell>
        <Cell><Data Type="String">DATA_SOURCE</Data></Cell>
        <Cell><Data Type="String">LAST_UPD_DATE</Data></Cell>
        <Cell><Data Type="String">LAST_UPD_USER</Data></Cell>
        <Cell><Data Type="String">BP_UPD_DATE</Data></Cell>
        <Cell><Data Type="String">PROVINCE_CODE</Data></Cell>
       </Row>
      </Table>
    </Worksheet>
    </Workbook>The output of test.xml is : This xml contains no element <Worksheet>
    The output of test1.xml with no namespace part is :
    This xml contains 1 <Worksheet> :
    Worksheet
    WHY ????????????????????????????

    I do not use jdom but I had similar problems. You can try "//:worksheet". The prefix for the default namespace might be "". it fixed my problem.
    wz

  • Unexpected start node "Insert" with namespace...

    Hi,
           I have a simple Biztalk app which receives an XML and sends to oracle DB using WCF-custom adapter.
    I generated schema from Visual Studio, created a map for inbound XSD to generated XSD mapping, deployed the app.
    Send port is configured to use the map and there is no orchestration.
    I run into following error. The error description is understood, but I am not able to see why it is happening.
    The adapter failed to transmit message going to send port "SendPort12" with URL "oracledb://DEVDB/". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: Unexpected start node "Insert" with namespace "http://Microsoft.LobServices.OracleDB/2007/03/DEVSCHEMA/Table/SITES" found.
    SOAP Action is :
    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Operation Name="Insert" Action="http://Microsoft.LobServices.OracleDB/2007/03/DEVSCHEMA/Table/SITES/Insert" />
    </BtsActionMapping>
    I have checked multiple posts on different sites for this error. I am still not able to figure out what is causing this. Any help is appreciated.
    Thanks,
    SRG

    Hi SRG,
    Can you try generating schema again as may be some table change may have occurred . It may be silly but you can try 
    There are tow different post which can relate to your issue and resolution
    https://social.msdn.microsoft.com/Forums/en-US/c9e15c82-3bec-4bbb-b3c2-2507206c2d40/microsoftservicemodelchannelscommonxmlreaderparsingexception-unexpected-start-node?forum=biztalkr2adapters 
    https://social.msdn.microsoft.com/Forums/en-US/59ef69e7-3159-4fd6-ba67-9120d907f95e/wcforacledb-unexpected-start-node-node-with-namespace?forum=biztalkr2adapters
    Thanks
    Abhishek

  • How must getElementsByTagName work on an xml file with namespaces?

    Hello together,
    is there any normative document, which specifies
    which nodes must be returned by
    the org.w3c.dom.Document method
    getElementsByTagName when which was
    created by a namespace aware dom parser
    from an xml file containing namespaces?
    In other words:
    when you have an xml file:
    <someprefix:somenode xmlns:someprefix="http://someuri">
    <someprefix:innertag>
    <someprefix:mostinnertag>
    </someprefix:mostinnertag>
    <someprefix:mostinnertag>
    </someprefix:mostinnertag>
    </someprefix:innertag>
    </someprefix>
    and you call
    document.getElementsByTagName( ... );
    1) How many nodes must be returned when giving
    "mostinnertag" as parameter?
    2) How many nodes when giving "someprefix:mostinnertag" as parameter?
    Is it allowed to use the "non namespaceaware"
    method and not "getElementsByTagNameNS"?
    I know:
    a) xerces returns 2 nodes when using
    alternative 2 and none with alternative 1
    b) oracle xml parser returns 2 nodes when using
    alternative 1 and none when using alternative 2
    Which implementation is right?
    Yours
    Stefan

    I've got some problems with this methos and xerces too.
    Perhaps the two implementations (xerces and oracle) are different. I mean xerces implementation gives you nodes of this name but without namespace and oracles's implementation gives you modes with namespace whose unprefix-name is "mostinnertag".

  • Unstructured Xml Storage with Namespaces - Problem in DML Queries

    Hai All,
    I worked with xml namespace with registering schema in db and referred in my xml document.It worked fine.
    But i want to work in unstructured xml document with namespaces, to do all dml queries like, select,update,delete using Xpath to xmltype.
    I could insert the records,When i try to select some element from xmltype field using Xptah from db,it does not bring any thing like element value or any error.It just displaying as empty value.I am using oracle 10g R2.
    Please help me how to select the element value from xmltype using XPath or whatever it is.
    Please help me out from this to follow
    Advance Thanks,
    P.Savananan

    SQL> create user marco identified by marco account unlock;
    User created.
    SQL> grant dba, xdbadmin to marco;
    Grant succeeded.
    SQL> conn marco/[email protected]
    Connected.
    SQL> create table xml_tab ( details xmltype);
    Table created.
    SQL> insert into xml_tab values(XMLTYPE('<?xml version="1.0" ?>
      2  <customers xmlns="http://localhost/openuri.org" >
      3  <customer>
      4  <order xmlns="http://orcl.com" >
      5  <ordername>Computer</ordername>
      6  <cost>35785638</cost>
      7  </order>
      8  </customer>
      9  </customers>'));
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select extractValue(details,'/customers/customer/order/ordername') from xml_tab;
    EXTRACTVALUE(DETAILS,'/CUSTOMERS/CUSTOMER/ORDER/ORDERNAME')
    SQL> set long 10000
    SQL> select * from xml_tab;
    DETAILS
    <?xml version="1.0"?>
    <customers xmlns="http://localhost/openuri.org">
      <customer>
        <order xmlns="http://orcl.com">
          <ordername>Computer</ordername>
          <cost>35785638</cost>
        </order>
      </customer>
    </customers>
    SQL> select extract(details,'//order/ordername') XDATA
      2  from   xml_tab
      3  ;
    XDATA
    SQL> select extract(details,'//order/ordername','xmlns="http://orcl.com"') XDATA
      2  from   xml_tab
      3  ;
    XDATA
    <ordername xmlns="http://orcl.com">Computer</ordername>
    SQL> select extractValue(details,'//order/ordername','xmlns="http://orcl.com"') XDATA
      2  from   xml_tab
      3  ;
    XDATA
    Computer
    SQL> select extractValue(details,'/*/*/order/ordername','xmlns="http://orcl.com"') XDATA
      2  from   xml_tab
      3  ;
    XDATA
    Computer

  • HT202667 Hi - My daughter was using her Apple TV until recently when she got a Smart TV.  Now the Apple TV is not needed so she passed it on to me.  How do I get it transferred over from her Home Sharing account to mine so that I can use it with my PC?

    Hi - My daughter was using her Apple TV until recently when she got a Smart TV.  Now the Apple TV is not needed so she passed it on to me.  How do I get her Home Sharing account transferred over to mine so that I can use it with my PC? Thanks!

    As  Winston Churchill wrote, however you might want to do a factory reset on the Apple TV.
    This way all information pertaining to your daughter will be removed from the device. Specifically if see was sign into any of the streaming service, Netflix, Hulu, etc. her credentials will still be associated with this Apple TV, doing  a factory reset will remove all that and make it as if you purchased the device and just plugged it in.
    regards

Maybe you are looking for

  • SAP Selection Screen

    Hi All, i was trying to call the Selection Screen on the basis of the Radio button present on the initial selection screen. can you please to let me know where i can give call to second selection screen and where to declare that selection screen. cur

  • Problem with MedRec development tutorial

    Hi, I am facing a problem trying to run the "Tutorial 11: Exposing a Stateless Session EJB as a Web Service" which is part of the MedRec Development Tutorial for WLS 8.1. On running the my_webserv.xml (copy of webservices_tutorial.xml) ant script, I

  • Mac word 2011 spellcheck

    Hello. I was given a Mac to set languages and dictionary's since the owner is busy. Now all I've left is spellcheck in word. I found out that there are Proofing tools and since Word lacks Proofing tools for Latvian language on this Mac  it won't spel

  • Problems with mailing list in mail & address book

    I have all my email in address book and I update my mass email list every few months.  The problem is that not everyone wants to be in my email list so I have them excluded from my list which means updating my list is a bit more onerous--I cannot jus

  • Character Issue

    It happened after i install snow version i dont know how to fix it pls help Here is the screenshot because i can't explain it: http://img40.imageshack.us/img40/7505/screenshot20090911at121.png Thanks