Problems getting namespace from XML

hi all....
I'm trying to parse this XML using SAX.
<soap: Envelope xmlns:..... (several namespaces)>
<soap:Body>
<GetResponse xmlns="http://altnamespace">
<GetResult>data</GetResult>
</GetResponse>
</soap:body>
</soap:Envelope>
my problem is I can't get to the embedded altnamespace in GetReponse.
here is a code snippet:
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(httpConn.getInputStream());
Element root = doc.getRootElement();
Namespace ns = root.getNamespace();
Element element = root.getChild("Body",ns)
ok so far -- I get the soap:Body element. But my problem is, I need that embedded "altnamespace" of the next element down, Get Response.
I've tried:
Namespace altNamespace = element.getChild("GetResponse").getNamespace();
but that returns null....
I need it so that I can execute the following code to get the data:
Element dataElement = element.getChild("GetImageResponse",altNamespace).getChild("GetImageResult",altNamespace);
String data = dataElement.getText();
any help would be appreciated..... forgive my ignorance....
sean

hi all....
I'm trying to parse this XML using SAX.
<soap: Envelope xmlns:..... (several namespaces)>
<soap:Body>
<GetResponse xmlns="http://altnamespace">
<GetResult>data</GetResult>
</GetResponse>
</soap:body>
</soap:Envelope>
my problem is I can't get to the embedded altnamespace in GetReponse.
here is a code snippet:
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(httpConn.getInputStream());
Element root = doc.getRootElement();
Namespace ns = root.getNamespace();
Element element = root.getChild("Body",ns)
ok so far -- I get the soap:Body element. But my problem is, I need that embedded "altnamespace" of the next element down, Get Response.
I've tried:
Namespace altNamespace = element.getChild("GetResponse").getNamespace();
but that returns null....
I need it so that I can execute the following code to get the data:
Element dataElement = element.getChild("GetImageResponse",altNamespace).getChild("GetImageResult",altNamespace);
String data = dataElement.getText();
any help would be appreciated..... forgive my ignorance....
sean

Similar Messages

  • RFC problem: could not get functionname from XML requst (sic)

    I'm developing an interface that attempts to call a receiver RFC on an SAP 4.6c system.  It's a very small simple interface, and it's all working until it tries to call the RFC.  The error is
    Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get functionname from XML requst: com.sap.aii.af.rfc.RfcAdapterException: failed to read funtionname from XML document: missing namespace declara
    I've created an RFC channel, which is green in the adapter monitoring.  The RFC imports without a problem, and appears in my interface mapping.  My mapping program converts to the RFC message type (as evidenced in sxmb_moni.  I have a receiver agreement referencing the interface mapping, which must be working as the mapping is called. 
    Could anyone point me to what else I could check?  I saw a post about the same error message, where the respondent found something in the logs which helped them  Could you expand on what you found, and in which log please?  Any pointers as to which logging options I could switch on and check would be gratefully received.
    Regards
    Alan Graham

    Thanks for the responses.
    I set up a communications channel of type RFC, which is
    showing green in the adapter monitor.  If I deliberately
    break it, eg by changing the password, the adapter shows
    as red in the monitor.  I assume therefore that the
    adaptor settings are correct.
    The XML going to the adapter looks correct AFAIK.  My problem is that I don't know enough about the requied XML to know if what I'm seeing in the logs is sufficient.  In SXMB_MONI, in the 'call adapter' section of a failed message, the outbound binding includes
    <SAP:ToInterfaceNamespace>urn:sap-com:document:sap:rfc:functions</SAP:ToInterfaceNamespace>/code]
    Also, the interface determination SOAP header, in the MAIN section includes
    [code]<SAP:Receiver>
      <SAP:Party agency="" scheme="" />
      <SAP:Service>D04</SAP:Service>
      <SAP:Interface namespace="urn:sap-com:document:sap:rfc:functions">Z_MPU_3PSCE_FREIGHT_UPLOAD</SAP:Interface>
      </SAP:Receiver>
    These are the correct values for the RFC name and the namespace, AFAIK.
    I'm using an interface mapping (which uses and ABAP class as the mapping program) which references the interface of the RFC.  The logs tell me this works, ie, the class is called and the resulting XML appears in the payload of the response.
    Alan

  • Removing Default Namespaces from XML

    Hi All,
    I am having a situation where I can't remove the default
    namespace from XML mainly
    because there is no namespace prefix.
    I hope this code snipped makes better sense.
    function test():void
    document:XML =
    <test xmlns:soap="
    http://example.com" xmlns="
    http://swanmokshi.com">
    <item>peter</item>
    <item>jenny</item>
    <item>JK Angel</item>
    <test>
    // I can remove the soap namespace by doing the following
    soap:Namespace = document.namespace("soap");
    document.removeNamespace(soap).
    Alert.show(document.toXMLString()); // should now display
    the xml document without the soap namespace
    Note that removing the soap namespace is easy because of the
    first namespace is named "soap". How do
    I removed the unnamed namespace, xmlns="
    http://swanmokshi.com" ?
    regards,
    Arun

    Same problem for me.
    XPath expression failed to execute. Error while processing xpath expression, the expression is "ora:processXSLT("Transformation_2.xsl", bpws:getVariableData("PartyID", "Header"))", the reason is Character reference "&#24" is an invalid XML character.. Please verify the xpath query.
    I am getting the date from Oracle Advanced Queue

  • Remove  Namespace from XML File except Attribute

    Hi  XI  Experts ,
    1.I have referred to the code of xslt Generic XSLT Code to Remove ALL Namespaces from XML:
    http://forums.sdn.sap.com/thread.jspa?threadID=1920630
    But this removes the Attribute : id  from the records .
    My expected output is supposed to be :
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record id="1">
           <fpdm></fpdm>
        </record>
    </data>
    </body
    But after using this XSLT code it removes :id from <record_1 id=> and generated the below code :
    The xml file now doesn't contain teh attribute :id
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record>
          1
          <fpdm></fpdm>          
           </record>
    </data>
    </body>
    Could  you please provide your input
    Plaese note : Here  XI versin iS x1 3.0 SP7 . I have tried suing the Analyzer bean for the Encoing  of Chinese : GBK Intsead of UTF-8 in the Namespace  . But AF_Modules/XMLAnonymizerBean is not comptacible with XI 3.0 SP7
    Hence i have used the following code to remove namespcae and add  Encoding :GBK instead of UTF-8:
    <?xml version="1.0" ?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output encoding="GBK"/>
    <xsl:template match="node()|@*">
      <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>

    You could use exclude-result-prefixes.
    For example:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wt="http://www.example.com" exclude-result-prefixes="wt">
    </xsl:stylesheet>

  • Removing namespace from xml

    Hi,
    I have an xml which has some target namespace.
    I need to remove the namespace and the qualifiers and put it on a machine using a file adapter.
    Any help in this regard is highly appreciated.
    With Regards,
    Harsh

    Please go throught the below link
    Removing namespace from xml  created

  • Problem getting sessions from sessions.xml

    I have been having difficulty getting a sessions.xml file deployed on our web application. I've found that if the file is not on the classpath, I do get an error indicating that the sessions.xml or Toplink properties file can not be found. But when I put the sessions.xml in the classpath and have checked to ensure that the projects referenced by the file are also in the classpath, I no longer get the error but for some reason sessions don't get populated by the SessionsManager. I've tried the code below both from within the webapp and also just from a main method in my IDE:
         SessionManager manager = SessionManager.getManager();      
         Hashtable sessions = manager.getSessions();
         System.out.println(sessions.size());
    And when I run it I get 0 as my answer. Is there anything more I need to do than set the sessions.xml as well as the projects (we're using compiled Java classes) in the classpath?
    Thanks in advance,
    Mark

    Ok, since the sessions are loaded lazily, I changed my code to the following below, but am now getting null when I specifically ask for 'ODSSession' in the code below.
    SessionManager manager = SessionManager.getManager();
    Session session = manager.getSession("ODSSession");
    System.out.println("session = " + session);
    Also, below is my sessions.xml with the database and login information changed for privacy purposes. The sessions.xml was setup using the workbench and I was able to map tables to the project using it. Am I missing something as to why I can't load the session?
    Thanks,
    Mark
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <toplink-sessions version="10g Developer Preview 3 (10.1.3.0 )" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <session xsi:type="server-session">
    <name>ODSSession</name>
    <server-platform xsi:type="oc4j-1013-platform"/>
    <event-listener-classes/>
    <primary-project xsi:type="class">sample.TestProject</primary-project>
    <login xsi:type="database-login">
    <platform-class>oracle.toplink.platform.database.oracle.Oracle9Platform</platform-class>
    <user-name>user</user-name>
    <password>password</password>
    <external-connection-pooling>true</external-connection-pooling>
    <external-transaction-controller>true</external-transaction-controller>
    <sequencing>
    <default-sequence xsi:type="table-sequence">
    <name>Default</name>
    </default-sequence>
    </sequencing>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <connection-url>jdbc:oracle:thin:@111.111.111.111:1521:ods</connection-url>
    </login>
    <connection-pools>
    <read-connection-pool>
    <name>ReadConnectionPool</name>
    <max-connections>2</max-connections>
    <min-connections>2</min-connections>
    </read-connection-pool>
    <write-connection-pool>
    <name>default</name>
    <max-connections>10</max-connections>
    <min-connections>5</min-connections>
    </write-connection-pool>
    </connection-pools>
    </session>
    </toplink-sessions>

  • Problem using namespace of XML docs gerenrated by  XMLForm

    Hi community!
    I am facing a problem using namespace within a XSL stylsheet. Let me describe my problem:
    I am using the SAP XMLFormsBuilder within the SAP EnterprisePortal in order to provide a HTML based form for creating and editing specific XML documents. The data in the generated documents is finally presented as HTML using XSL Transformation.
    In the XMLFormsBuilder you define the Schema of the XML document and the HTML GUI of the form. The Schema document looks like below (extract):
    <?xml version="1.0" encoding="utf-8"?>
    <schema targetNamespace="http://www.xmlspy.com/schemas/orgchart"
            xmlns="http://www.w3.org/2001/XMLSchema"
            xmlns:xyz="http://www.xmlspy.com/schemas/orgchart" Version="6.3.0">
      <element name="commodity"
               default=""
               minOccurs="1"
               maxOccurs="1"
               ns="p2p"
               xmlns:p2p="http://www.portal.p2p.com">
        <complexType>
          <sequence>
            <element name="administrative_information"
                     default=""
                     minOccurs="1"
                     maxOccurs="1"
                     ns="p2p">
              <complexType>
                <sequence>
                  <element name="creation_date"
                           default=""
                           minOccurs="1"
                           maxOccurs="1"
                           type="date"
                           ns="p2p"/>
    As far as I understand, each element defined in the Schama belongs to the namespace "p2p" and this is exactly what I want.
    The XML document generated by the form looks like below (extract):
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="show_card.xsl"?>
    <commodity xmlns:xf="http://www.sapportals.com/wcm/app/xmlforms"
               xmlns:xsi="http//www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="/etc/xmlforms/P2PCategoryCard_TEST/P2PCategoryCard_TEST-Schema.xml">
      <administrative_information>
        <creation_date>2005-07-04</creation_date>
    Consequently, the file "show_card.xsl" is the responsible XSLT stylesheet, which looks like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:p2p="http://www.portal.p2p.com">
      <xsl:output method="html"/>
      <xsl:template match="p2p:commodity">
        <html>
        <body>
          <h2>XSLT Test</h2>
          Creation Date: <xsl:value-of select="p2p:administrative_information/p2p:creation_date"/>
        </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>
    The problem in the XSLT stylesheet is, that I want to access the XML document elements using their namespace. And this is exactly what does not work for me. On the other hand, if I remove the reference to the namespace:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:p2p="http://www.portal.p2p.com">
      <xsl:output method="html"/>
      <xsl:template match="commodity">
        <html>
        <body>
          <h2>XSLT Test</h2>
          Creation Date: <xsl:value-of select="administrative_information/creation_date"/>
        </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>
    the stylesheet works fine, but for some technical reasons, which I don't want to explain here, I have to use the namespace when accessing the XML document elements.
    For technical reasons, I cannot change the format of the Schema document and also cannot change the format of the generated XML document. The only file I can change and control is the XSLT stylsheet.
    My question is now, in the case described above, if there is any way to use the namespace in the sytlesheet when accessing the XML elements?
    Any help is appreciated.
    Cheers,
    Adam Kreuschner

    duggal.ashish wrote:
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - &#146; and the problem is that words like can&#146;t are shown as can?t by database.http://en.wikipedia.org/wiki/ISO8859-1
    Scroll down in that page and you'll see that the character code 146 -- which would be 92 in hexadecimal -- is in the "unused" area of ISO8859-1. I don't know where you got the idea that it represents some kind of apostrophe-like character but it doesn't.
    Edit: Actually, I do know where you got that idea. You got it from Windows-1252:
    http://en.wikipedia.org/wiki/Windows-1252
    Not the same charset at all.

  • How to get attribute from xml file

    I managed to grab all the info from xml, except the "url" attribute in <image type="poster" url="" size="mid" .../>. Any ideas?
    import java.io.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import java.net.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class XmlParser {
         ArrayList<Movie> myMovies;
         Document dom;
         public XmlParser(){
              //create a list to hold the movie objects
              myMovies = new ArrayList<Movie>();
         public void runExample(String adr, String tagName) {
              parseXmlFile(adr);
              parseDocument(tagName);
              printData();          
         private void parseXmlFile(String adr){
              //get the factory
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              try {               
                   //Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   //parse using builder to get DOM representation of the XML file
                   URL xmlUrl = new URL(adr);
                   InputStream in = xmlUrl.openStream();
                   dom = db.parse(in);               
              }catch(ParserConfigurationException pce) {
                   pce.printStackTrace();
              }catch(SAXException se) {
                   se.printStackTrace();
              }catch(IOException ioe) {
                   ioe.printStackTrace();
         private void parseDocument(String tagName){
              //get the root elememt
              Element docEle = dom.getDocumentElement();
              //get a nodelist of <movie> elements
              NodeList nl = docEle.getElementsByTagName(tagName);
              if(nl != null && nl.getLength() > 0) {
                   for(int i = 0 ; i < nl.getLength();i++) {
                        //get the movie element
                        Element el = (Element)nl.item(i);
                        //get the Movie object
                        Movie mov = getMovie(el);
                        //add it to list
                        myMovies.add(mov);
          * I take an movie element and read the values in, create
          * an Movie object and return it
          * @param movE
          * @return
         private Movie getMovie(Element movE) {
              String title = getTextValue(movE, "original_name");
              String year = getTextValue(movE, "released");
              String imdbId = getTextValue(movE, "imdb_id");
              double score = getDoubleValue(movE, "score");
              String overview = getTextValue(movE, "overview");
              String poster = movE.getAttribute("url");
              Movie mov = new Movie(title, year, imdbId, score, overview, poster);
              return mov;
         private String getTextValue(Element ele, String tagName) {
              String textVal = null;
              NodeList nl = ele.getElementsByTagName(tagName);
              if(nl != null && nl.getLength() > 0) {
                   Element el = (Element)nl.item(0);
                   textVal = el.getFirstChild().getNodeValue();
              return textVal;
          * Calls getTextValue and returns a int value
          * @param ele
          * @param tagName
          * @return int
         private int getIntValue(Element ele, String tagName) {
              //in production application you would catch the exception
              return Integer.parseInt(getTextValue(ele, tagName));
          * Calls getTextValue and returns a double value
          * @param ele
          * @param tagName
          * @return double
         private double getDoubleValue(Element ele, String tagName) {
              return Double.parseDouble(getTextValue(ele, tagName));
          * Iterate through the list and print the
          * content to console
         private void printData(){
              System.out.println("Total Movies: " + myMovies.size());
              Iterator it = myMovies.iterator();
              while(it.hasNext()) {
                   System.out.println(it.next().toString());
         public static void main(String[] args){
              //create an instance
              XmlParser xp = new XmlParser();
              //call run example
              xp.runExample("http://api.themoviedb.org/2.1/Movie.search/en/xml/apikey/Fight+Club+1999", "movie");
    }Here is the example xml file I used
    <?xml version="1.0" encoding="UTF-8"?>
    <OpenSearchDescription xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
      <opensearch:Query searchTerms="Fight Club 1999"/>
      <opensearch:totalResults>1</opensearch:totalResults>
      <movies>
        <movie>
          <score>8.383284</score>
          <popularity>3</popularity>
          <translated>true</translated>
          <adult>false</adult>
          <language>en</language>
          <original_name>Fight Club</original_name>
          <name>Fight Club</name>
          <alternative_name>El Club de la Lucha</alternative_name>
          <type>movie</type>
          <id>550</id>
          <imdb_id>tt0137523</imdb_id>
          <url>http://www.themoviedb.org/movie/550</url>
          <votes>62</votes>
          <rating>8.4</rating>
          <certification></certification>
          <overview>A lonely, isolated thirty-something young professional seeks an escape from his mundane existence with the help of a devious soap salesman. They find their release from the prison of reality through underground fight clubs, where men can be what the world now denies them. Their boxing matches and harmless pranks soon lead to an out-of-control spiral towards oblivion.</overview>
          <released>1999-09-16</released>
          <images>
            <image type="poster" url="http://hwcdn.themoviedb.org/posters/f75/4bc908ab017a3c57fe002f75/fight-club-original.jpg" size="original" width="1000" height="1500" id="4bc908ab017a3c57fe002f75"/>
            <image type="poster" url="http://hwcdn.themoviedb.org/posters/f75/4bc908ab017a3c57fe002f75/fight-club-mid.jpg" size="mid" width="500" height="750" id="4bc908ab017a3c57fe002f75"/>
            <image type="poster" url="http://hwcdn.themoviedb.org/posters/f75/4bc908ab017a3c57fe002f75/fight-club-cover.jpg" size="cover" width="185" height="278" id="4bc908ab017a3c57fe002f75"/>
            <image type="poster" url="http://hwcdn.themoviedb.org/posters/f75/4bc908ab017a3c57fe002f75/fight-club-thumb.jpg" size="thumb" width="92" height="138" id="4bc908ab017a3c57fe002f75"/>
            <image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f71/4bc908ab017a3c57fe002f71/fight-club-original.jpg" size="original" width="1280" height="720" id="4bc908ab017a3c57fe002f71"/>
            <image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f71/4bc908ab017a3c57fe002f71/fight-club-poster.jpg" size="poster" width="780" height="439" id="4bc908ab017a3c57fe002f71"/>
            <image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f71/4bc908ab017a3c57fe002f71/fight-club-thumb.jpg" size="thumb" width="300" height="169" id="4bc908ab017a3c57fe002f71"/>
          </images>
          <version>73</version>
          <last_modified_at>2010-09-11 14:33:06</last_modified_at>
        </movie>
      </movies>
    </OpenSearchDescription>

    pvujic wrote:
    Thanks, but how can I "fetch" the url from the image element?You've got to first get to the image element. But based on what you've posted though, with a little more coding, you should be able to succeed. Just give it a try! :)

  • Problem getting video from firewire camera

    I've written a small app that gets video from camera and
    publishes it through FMS(2). It works well with any USB webcams I
    could find, but I have problems with firewire cameras. I can select
    the camera in Flash settings, and getCamera() returns the
    appropriate Camera object (e.g. it has the correct name, "Microsoft
    DV Camera", which is what's its name in Windows), but I get
    no/blank video.
    Code snippet:
    var myCam:Camera = Camera.getCamera();
    Alert.show("Using " + myCam.name);
    videoDisplay.attachCamera(myCam);
    The same code and the same camera seems to work on OS X. I've
    tried out two different firewire cameras on two different Windows
    (XP) machines, and they consistently didn't work. They do work in
    Flash Media Encoder (I'm not sure if it was written in Flash
    engine), or other programs that do capture in Windows; but my
    problem is that I need to inject metadata (stream.send()) into the
    stream so i can't just use FME :(
    Any ideas why this doesn't work? Do firewire cameras have
    issues with flash/flex (for the reference, I'm using Flex2/Flash9)
    on Windows XP, or am I doing something wrong here?
    Senko

    HI -
    MPEG Streamclip does not act as a connection device between your camera and Final Cut.
    It is a stand-alone application that converts the files from your camera into files that are useable in Final Cut.
    The reason Final Cut does not "see" your camera directly is that the files are not usable in Final Cut - as recorded by the camera. Those same files are seen and imported in iMovie because iMovie is designed to support a wide variety of consumer formats, and converts them automatically on import to a format the iMovie can use. FCE does not have this feature for .mpg movie files. But the format the iMovie converts to is one that is not optimal for FCE.
    Once you have converted the files that you want to use in MPEG Streamclip, you can store those converted files on your disk drive in a folder. Then open FCE an go to the menu File > Import > Files and navigate to where you have stored your converted files. Select them and the will be imported into FCE.
    It is preferable to import using the MPEG Streamclip method, because the files that iMovie makes, are borderline usable in FCE, and if possible, should be avoided.
    Hope this helps.
    MTD

  • How to remove namespace from xml in ALSB?

    I have a xquery transformation which works for data without namespace. But the data coming from source system has namespace details in it. Is there a way to strip the xml of namespace details from xml before passing it to xquery transformation?

    Hi
    silly mistake :P
    Following 'bold' declaration was not there!!
    Just copy paste following code as xquery and it will be all ok:
    declare namespace xf = "http://tempuri.org/vijfhuizen/com/myMessage/";
    declare function xf:strip-namespace($e as element())
    as element()
    element { xs:QName(local-name($e)) }
    for $child in $e/(@*,node())
    return
    if ($child instance of element())
    then xf:strip-namespace($child)
    else $child
    declare variable $e as element() external;
    xf:strip-namespace($e)

  • ICloud sync problem - getting messages from one contact on two different phones

    My partner and I accidentally synced our phones to the same iCloud account and all of our contacts merged. We solved that problem but now we're both getting messages from one of my contacts at the same time. We've both deleted the contact and the message string, and that hasn't seemed to help. Any advice would be most appreciated.

    Reset iMessage by turning it off and then back on. You might have to restore phones as new because I message Registers the phone with the cloud.

  • Using java to get stuff from xml

    Hi,
    i need to parse stuff from XML file into java from different nodes and attributes. I thought of using the DOM. can you all suggest any sites that have examples to that or give me some suggestions on how to code it?
    Thanks!

    http://java.sun.com/webservices/docs/1.0/tutorial/index.html

  • Problem getting photos from canon powershot

    Just recently I have not been able to get photos from my SanDisk card. When I put the card into my HP Photosmart printer, either nothing happens or I get an error message on the printer. I have an iMac (intel) and I recently upgraded everything to Snow Leopard.
    I then thought to bypass the printer altogether and go straight from the camera to the computer, but then I get a message "failed to initiate" . . . any ideas?
    Thanks in advance!
    Marcie

    Oh, I made a mistake: the message I get is "failed to initialize program"

  • Problem getting data from a stored procedure

    On the Oracle DB there's a stored proc defined like:
    PROCEDURE pGetHashes ( iFrom IN NUMBER, iTo IN NUMBER, sHash1 OUT CHAR, sHash2 OUT CHAR );
    When I call this procedure from within my app, I only get a value for the sHash2 parameter. The value of the sHash1 parameter is always null. (Running the same stored proc from sqldeveloper gives a result for both hash values.)
    Underneath I have added the code which I use to call the stored proc. Does anybody see anything I might have done wrong?
    int iFrom = 0;
    int iTo = 1000;
    using (IDbCommand command = dbConnection.CreateCommand())
    OracleCommand orclCommand = command as OracleCommand;
    orclCommand.CommandText = "pGetHashes";
    orclCommand.CommandType = CommandType.StoredProcedure;
    orclCommand.Parameters.Clear();
    orclCommand.Parameters.Add("iFrom", OracleDbType.Int32, iFrom, ParameterDirection.Input);
    orclCommand.Parameters.Add("iTo", OracleDbType.Int32, iTo, ParameterDirection.Input);
    OracleParameter orclParam = new OracleParameter("sHash1", OracleDbType.Char, 100);
    orclParam.Direction = ParameterDirection.Output;
    orclCommand.Parameters.Add(orclParam);
    orclParam = new OracleParameter("sHash2", OracleDbType.Char, 100);
    orclParam.Direction = ParameterDirection.Output;
    orclCommand.Parameters.Add(orclParam);
    orclCommand.BindByName = true;
    orclCommand.ExecuteNonQuery();
    // after this the orclCommand.Parameters["sHash1"].Value is always null.
    // the orclCommand.Parameters["sHash2"].Value has the correct value.
    For extra documentation. Running the following PLSQL from within sqldeveloper results in both a value for Hash1 and Hash2:
    SET SERVEROUTPUT ON;
    DECLARE
    sHash1 CHAR(67);
    sHash2 CHAR(67);
    nFrom NUMBER := 0;
    nTo NUMBER := 1000;
    BEGIN
    pGetHashes( nFrom, nTo, sHash1, sHash2 );
    dbms_output.put_line('Hash1: '|| sHash1);
    dbms_output.put_line('Hash2: '|| sHash2);
    END;
    Thanks for any light you can shed on this problem.

    I can only assume that something is "going wrong" inside your procedure that is resulting in NULL actually being returned, although I don't see any reason the code should be causing it.
    Try the folllowing "pGetHashes2" procedure, and let me know if you see the same results with your code. It works fine for me anyway..
    Greg
    create or replace procedure pGetHashes2 (iFrom number, iTo number, sHash1 out char, sHash2 out char)
    as
    begin
    shash1 := 'foo';
    shash2 :='bar';
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    namespace otnpost
        class Program
            static void Main(string[] args)
                OracleConnection dbConnection = new OracleConnection("data source=orcl;user id=scott;password=tiger");
                dbConnection.Open();
                int iFrom = 0;
                int iTo = 1000;
                using (IDbCommand command = dbConnection.CreateCommand())
                    OracleCommand orclCommand = command as OracleCommand;
                    orclCommand.CommandText = "pGetHashes2";
                    orclCommand.CommandType = CommandType.StoredProcedure;
                    orclCommand.Parameters.Clear();
                    orclCommand.Parameters.Add("iFrom", OracleDbType.Int32, iFrom, ParameterDirection.Input);
                    orclCommand.Parameters.Add("iTo", OracleDbType.Int32, iTo, ParameterDirection.Input);
                    OracleParameter orclParam = new OracleParameter("sHash1", OracleDbType.Char, 100);
                    orclParam.Direction = ParameterDirection.Output;
                    orclCommand.Parameters.Add(orclParam);
                    orclParam = new OracleParameter("sHash2", OracleDbType.Char, 100);
                    orclParam.Direction = ParameterDirection.Output;
                    orclCommand.Parameters.Add(orclParam);
                    orclCommand.BindByName = true;
                    orclCommand.ExecuteNonQuery();
                    // after this the orclCommand.Parameters["sHash1"].Value is always null.
                    // the orclCommand.Parameters["sHash2"].Value has the correct value.
                    Console.WriteLine(orclCommand.Parameters["sHash1"].Value);
                    Console.WriteLine(orclCommand.Parameters["sHash2"].Value);
    }OUTPUT
    ==========
    foo
    bar
    Press any key to continue . . .

  • CS4 Problem getting text from Illustrator over to Photoshop.

    What a mess and why is  this so difficult. I finally figured out how to create my text on a curve and leave the letters going straight up and down. So I am trying to paste or drag and drop over to my bottle in Photoshop but what happens is that the text is in a clear area But then it creates a white box around that so I can't see my bottle. I have a lot of bottles I need to change the names on and no time to reshoot and knock them all out. Help please!!! I am going to try and attach images again but when I tried in  the Illustrator forum... the load button was greyed out.
    Now on top of it, I am trying to create an image to attach... and it's doing even more crazy stuff. I created an image with the full bottle on L and what is supposed to be the full bottle on the R = only instead for some reason.... my text is coming over from Illustrator with an additional white box blocking most my bottle... then on top of it.... I tried to just type in what was going on and then if I rasterize the text OR I just try to save.... it created a new black box blocking the bottom 1/2... now what do I do??? This is really a mess!!!!

    OK. The bottle on the L is what the bottle is supposed to look like.... minus the black box on the bottom. The L bottle is placed there in photoshop just to show what it is supposed to look like. Then the other layer had the bottle on the R or what is supposed to be the full bottle that I am trying to get my Eyelash Recovery text onto that one on that layer.
    The bottle on the R is the problem. The white box is the entire area around the small area of the bottle being shown. Yes, trying to bring just the text Eyelash Recovery over from Illustrator = it created the white box all by itself. (Create Outlines did not help at all)
    Note. I created the words Eyelash Recovery in text on a circle in Illustrator and then tried to drag and drop AND I tried to copy/paste into Illustrato = both ways. Both failed and created everything that is white around the R bottle that only shows the small area of the bottle. Anything around the small window of the bottle = which is actually a transparent area around the text Eyelash Recovery that allows the bottle on the L to show thru. So it came over as a small area of transparent window with the text in it (not centered as you can see) AND a white box around that window that I could not get rid of.
    But then, for some reason, it then also wanted to created the black blox on bottom out of the clear blue = where that came from I do not know.
    So I created the text Eyelash Recovery in Illustrator on the oval and placed it in position on the oval using the text on path tool. I then used the type > skew to get the text to bet straight up and down instead of curving into the oval. Then I tried 2 ways. 1 was to copy/paste into Photoshop on top of the bottle and the other was to drag and drop. It wanted to place it as pixels. So I allowed it to paste as pixels. And I allowed it to apply. In the layers palette however, it showed as a vector smart object = ???
    Then I tried to rasterize that layer which now said it wanted to rasterize the smart object (which I did not 1. place OR 2. drag and drop as a smart object).
    For some reason, instead of only coming over as the Eyelash Recovery text, it came over with just a small transparent window (which you can see on the L side above AND it created the rest as a white box around that that obliterated the rest of the image. Yes, I could move the Eyelash Recovery text and the transparent window around to show diff. parts of the bottle but only this amount as seen above. But I could not get rid of the white around the transparent window to see the bottle below in full and to place my Eyelash Recovery text.
    Then on top of it... for some reason, when I rasterized that layer, it created the black box you see on the bottom of the image above and there was no way to get rid of either the white area OR the black box area at bottom
    A mess?? Yes.

Maybe you are looking for