Accessing Atom XML entry by id?

Hello,
I have a strange problem when trying to access atom feeds (or
any xml really).
I'm using a standard HttpService to grab an atom feed, then
i'm trying to access a particular node summary from its id with
this xml query:
myLabel.text=myFeed..entry.(id=="elementidhere").summary;
But it will not match any entry based on the id, yet it will
quite happily match against the title or any other node as such:
myLabel.text= myFeed..entry.(title=="Welcome").summary;
And will even output the id just to prove it exists:
myLabel.text= myFeed..entry.(title=="Welcome").id;
Is there something special about the id node so I cant do a
straightforward match against it- I'm using the atom namespace
which reports the id as a uri so do I need to handle it
differently. I've tried converting it to a string also, but this
then throws an error saying its null:
myLabel.text=myFeed..entry.(id.toString()=="tag:elementid").summary;
Any ideas?
Anthony

Use this as your schema. It should work then.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="EntryClass">
<xsd:attribute name="ID" type="xsd:ID" use="required"/>
<xsd:attribute name="value" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="MapClass">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="entry" type="EntryClass"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="map" value="MapClass"/>
</xsd:schema>

Similar Messages

  • In a JSP how can access an XML where the XML is present in JAR file in the

    All,
    The Requirement is as below,
    I have a JSP LaunchMe.jsp, and I have a jar utils.jar. both are present in my deployable war file.
    And I have an XML Details.XML present in the utils.jar file.
    Here I want to access Details.xml in the LaunchMe.jsp.
    Can any one please let me know how can I do this.
    Thanks,
    Subramanyam V

    Yes. You have to understand that to read a FILE (one that is seen as a file by your OS), you probably use a FileInputStream, which is a special case of InputStream. When the 'file' is not a FILE anymore, but an entry in a jar (the OS does not see it, only utilities like WinZip or jar see it), you cannot use a FileInputStream, but some other InputStream. Which one? The one returned by getResourceAsStream(), whatever this is (you don't really care). And all the rest will nicely fall into place.

  • How to Transform POJO to ATOM Feed entry

    Hi,
    I have a Java Object which I need to use in order to construct an ATOM Feed Entry.
    The Entry should look like this:
    <entry>
        <title>Details</title>
        <content type="application/xml">
          <ooo:information xmlns:ooo="http://test.company.com">
            <ooo:type>var_ConfigType_00</ooo:type>
            <ooo:ID>var_InstanceID_00</ooo:ID>
            <ooo:properties>
              <ooo:property name="abc.1" value="xyz.1" />
              <ooo:property name="abc.2" value="xyz.2" />
              <ooo:property name="abc.3" value="xyz.3" />
              <ooo:property name="abc.4" value="xyz.4" />
              <ooo:property name="abc.5" value="xyz.5" />
            </ooo:properties>
          </ooo:information>
        </content>
      </entry>I am using abdera like this:
    Abdera abdera = new Abdera();
            Factory factory = abdera.getFactory();
            Entry entry = factory.newEntry();
            entry.setTitle("Details");Now what should I do to set the contents so that my entry looks like above.
    Thanks
    SAM

    you may try some XML binding tool instead of DOM. (e.g. http://xstream.codehaus.org/tutorial.html).
    There is no problem generating DOM. Its about generating oracle.xdb.XMLType using java api. Could you show a code snippet that would generate XMLType using xstream or other XML binding tools ?
    2) you may use DBMS_XDB.CREATERESOURCE to create a resource from varchar2 or clob parameter.
    Could you show a code snippet that inserts into Secure Binary XMLType table using CreateResource ? Im not using schema. Also Varchar supports 32kb. Conversion from Java String XML to CLOB is expensive ( because Oracle uses jdbc connection)

  • CFHTTP request with content-type "application/atom+xml"

    Is it possible to send a HTTP request (method="post")  with a body that has a set content-type (such as "application/atom+xml")?
    using CFHTTP and CFHTTPPRAM, it seems the tag does not accept a content-type.
    <cfhttpparam type="body" value="#myAtomXML#">
    is there anyway to have CFHTTP , post the body with a given content-type?
    IF NOT, could anyone point me to the right direction to accompolish this using Java?

    Hi,
    Have you tried the "mimetype" attribute of the <cfhttpparam> tag?.
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_10.html

  • Accessing the xml content

    can any one help me to access the xml contents using a servlet or a java code.
    eg: there are some tags in xml and i want to access those contents from those tags and display it..
    if u can please mail me to:
    [email protected]

    Hi Suresh
    I need the same one for my requirement if u have please post to this site or send me an email .
    [email protected]
    I can able to parsed one structured XML file using SAX
    Sample code :
    // ===========================================================
         // SAX DocumentHandler methods
         // ===========================================================
         public void startDocument() throws SAXException {
              logger.info("Start of document");
         public void endDocument() throws SAXException {
              logger.info("End of document");
         public void startElement(String namespaceURI, String localName, // local
                   // name
                   String qualName, // qualified name
                   Attributes attrs) throws SAXException {
              elemName = new String(localName); // element name
              if (elemName.equals(""))
                   elemName = new String(qualName); // namespaceAware = false
              tagPosition = TAG_START;
              // Set the string for accumulating the text in a tag to empty
              elemChars = "";
              // If the element name is "row", create a new row instance
              // If the element is "indexxid", "ModelPrice", or "ModelSpread",
              // the value will be read in the method "characters" and stored.
              if (elemName.equals("row")) {
                   row = new IndexRow();
                   numRows++;
              // logger.info("Number of numRow:"+numRows);
         } // end method startElement
         public void endElement(String namespaceURI, String simpleName, // simple
                   // name
                   String qualName // qualified name
         ) throws SAXException {
              elemName = new String(simpleName);
              if (elemName.equals(""))
                   elemName = new String(qualName); // namespaceAware = false
              tagPosition = TAG_END;
              String indexId = new String();
              Double dblVal = new Double(0);
              // If element name is "row", put the current row in the map for row
              // instances
              if (elemName.equals("row")) {
                   if (numRows <= 5) { logger.info("Row is: " + row.toString()); }
                   //ABX
                   //indexRows.put(row.getIndexxId(), row);
                   if (family.equals("ABX.HE")){
                   indexRows.put(row.getIndexREDId(), row);
                   else {
                        //CDX ITRXX
                             indexRows.put(row.getIndexxId(), row);
              } else if (elemName.equals("IndexID")) {
                   row.setIndexxId(elemChars);
              else if (elemName.equals("ModelPrice")) {
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setModelPrice(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("ModelSpread")) {
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setModelSpread(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("CompositePrice")) {
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setCompositePrice(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("CompositeSpread")) {
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setCompositeSpread(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("REDCode")) {
                   row.setRedCode(elemChars);
              else if (elemName.equals("Name")) {
                   row.setRowName(elemChars);
              } else if (elemName.equals("Series")) {
                   row.setSeries(elemChars);
              } else if (elemName.equals("Version")) {
                   row.setVersion(elemChars);
              } else if (elemName.equals("Term")) {
                   row.setTerm(elemChars);
              } else if (elemName.equals("Maturity")) {
                   row.setMaturity(elemChars);
              } else if (elemName.equals("OnTheRun")) {
                   row.setOnTheRun(elemChars);
              } else if (elemName.equals("Date")) {
                   row.setRowDate(elemChars);
              } else if (elemName.equals("Depth")) {
                   row.setDepth(elemChars);
              else if (elemName.equals("Heat")) {
                   // logger.info("Chars for element " + elemName + " are '" +
                   // elemChars + "'");
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setHeat(dblVal);
                        indexId = row.getIndexxId();
    //          ABX.HE
              else if (elemName.equals("IndexREDId")){
                   row.setIndexREDId(elemChars);
              else if (elemName.equals("Coupon")){
                   row.setCoupon(elemChars);
              if (elemName.equals("Ontherun")) {
                   row.setOnTheRun(elemChars);
         } // end method endElement
         public void characters(char buf[], int offset, int len) throws SAXException {
              // If at end of element, there will be no characters
              if (tagPosition == TAG_END) {
                   return;
              // The characteres method may be called more than once
              // for an element if the internal buffer fills up.
              // Append the characters until the end of the element.
              String strVal = new String(buf, offset, len);
              elemChars = elemChars + strVal;
         } // end method characters
    } // end class MarkItIndexLoader
    but the problem is i want to parse any XML file means any Elemets would be change any time using SAX .In the above example
    else if (elemName.equals("Heat")) {
    else if (elemName.equals("IndexREDId")){
    } else if (elemName.equals("Maturity")) {
    like above I am doing hard code so i don't want hard coding the elements names I want to read any element name and value dynamically.
    Dynamically i want to read the root and child elements
    EX: I can give any XML file like
    Student.XML: <root>..</StName>..</StAge>...</root>
    Employee.XML: <root>..</EmpName>..</EmpAge>...</root>
    CdCatalog.XML: <root>..</Cdtitle>...</CdNumber>...</root>
    I need one java program can ready any type of XML file elements and send to the Database table.
    Please any one done like this task please suggest some reference links or books or sample snippet which can help me to develop program in my requirement.

  • Webfolder access to XML stored in database is extremly slow (XP)

    Hello,
    I made a webfolder to access my XML-documents stored in the database over explorer. My OS is XP. But the access is extremly slow. When I access the documents from a Windows2000 computer the access is fast. Has anybody an idea what could be the reason for this??
    Any help appreciated.
    Anna

    None of them go throug the proxy server. Oracle suggests to install some XP-Patches what I have done. Now the webfolder access is normal. It is an XP ServicePack1 - problem.
    Thanks.
    Anna

  • Access the XML file

    Hi
    I am having to access the XML file names and/or XML data from a shared folder of XI system. I need to access that shared folder and display the information like the name of the file or the data in it on to a portal. Please let me know how do I go about it.
    thank you
    chan

    First of all thank you very much
    I want began to implement it on my computer
    This code
    <object classid = "clsid: d27cdb6e-ae6d-11cf-96b8-444553540000" codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab # version = 9,0,0, 0 "width =" 920 "height =" 218 "id =" banner "align =" middle ">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="true" />
    <param name="movie" value="banner.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" />
           <param name="FlashVars" value="setupXML=1/newSettings.xml&contentXML=1/newContent.xml"/>
         <embed src = "banner.swf" FlashVars = "setupXML = 1/newSettings.xml & contentXML= 1 / newContent.xml" quality = "high" bgcolor = "# ffffff" width = "920" height = "218" name = "banner "align =" middle "
         allowScriptAccess = "sameDomain" allowFullScreen = "true" type = "application / x-shockwave-flash" pluginspage = "http://www.macromedia.com/go/getflashplayer" />
    </ object>
    I added the NEXT code, originally no FlashVars code
    FlashVars = "setupXML = 1/newSettings.xml & contentXML = 1 / newContent.xml"
           <param name="FlashVars" value="setupXML=1/newSettings.xml&contentXML=1/newContent.xml"/>
    Post
    Attempting to launch and connect to Player using URL D: \ 87 \ banner.swf
    [SWF] D: \ 87 \ banner.swf - 518076 bytes after decompression
    IOERROR (maybe the XML file does not exit or have an incorrect name)

  • How to read and process oData service's ATOM XML output?

    Hi,
    I have a RFC created in system A which will call oData services of system B. I am calling this in a report using class methods,  cl_http_client. I will get the response in a ATOM XML format. Is there a standard way to read and process such ATOM XML in abap report without using further addons?
    Regards,
    Vinay

    You need to pass your filename String as a parameter to your functionality. It depends how you're currently set up though. We can't really see the top of your call so it's difficult to determine what you are calling and we don't really know from where you're calling either.
    If you're running standalone, then on launch of the application, you can feed in a file name as an argument that you can read in in String args[] in the main function and pass down to your XML splitter.
    If you're a method in a class that's part of a bigger pile, you can feed the file name as a String to the method from wherever you call from if it makes sense architecturally.
    You might also want to pass down a File object if that makes sense in your current code (i.e. if you're using your file for other purposes prior to the split, to avoid recreating closing/opening for no reason).
    Depends what you're trying to do. If I put together a piece like this, I would probably create an <yourcurrentrootpackage>.xml.splitter package.
    Also, on a side note, you're problem isn't really reading and writing XML in java, but seems more to be making your functionality generic so that any XML file can be split with your code.
    Regards
    JFM

  • SJSC2u1 JSP accessing web.xml session-config session-timeout

    What is the best way of accessing web.xml session-config session-timeout from JSP page ?
    I wish to have this on the JSP page and also have it count down automatically.
    I did this by creating a propery in the session bean and then used javascript to count it down.
    Is there a better way ? Simpler Way ?
    /Roger

    What is the best way of accessing web.xml session-config session-timeout from JSP page ?
    I wish to have this on the JSP page and also have it count down automatically.
    I did this by creating a propery in the session bean and then used javascript to count it down.
    Is there a better way ? Simpler Way ?
    /Roger

  • JSON deep insert returns atom/xml

    Dear,
    When I test a json deep insert (For eaxmple:a POST on /sap/opu/odata/sap/<Gateway_service>/<GW_Data>Set in the GW Client then it returns the result in atom/xml....
    If i add ?$format=json to the call i receive following error:
    The Data Services Request contains SystemQueryOptions that are not allowed for this Request Type
    Is there a way to get the response in json for a POST deep insert/create?
    Thanks in advance!
    Kind Regards,
    Robin

    Hi Robin,
    This error is coming from method PROCESS_ENTITY_SET (/IWCOR/CL_DS_PROC_DISPATCHER)
    Below system query options are not allowed for POST.
    " system query option are not allowed
             IF io_uri->expand IS NOT INITIAL OR
                io_uri->select IS NOT INITIAL OR
                io_uri->filter IS BOUND OR
                io_uri->orderby IS BOUND OR
                io_uri->skip IS NOT INITIAL OR
                io_uri->top IS NOT INITIAL OR
                io_uri->skiptoken IS NOT INITIAL OR
                io_uri->inlinecount IS NOT INITIAL OR
                io_uri->format IS NOT INITIAL.
               RAISE EXCEPTION TYPE /IWCOR/cx_DS_proc_error
                 EXPORTING
                   textid = /IWCOR/cx_DS_proc_error=>invalid_system_query_option.
    ENDIF.
    May be using batch call you can get response in JSON format. I mean using batch method, 1st give call to POST and then to GET which allows $format.
    again on client side (may be ui5), you can easily convert response in json format with available APIs.
    Regards,
    Chandra

  • Access interface related entries from within Receiver Communication Channel

    Hi,
    when i open the interface determintation that i created, i can see.
    Sender Details:
    Communication Component:Sys_Sample_One_D
    Interface: UserMasterQuery_Outb
    Namespace: urn:sample.com:I_Legacy_JDBC_Application
    Receiver Details:
    Communication Component:Sys_Sample_Two_D
    Interface:EmployeeEmailProcessing_Inb
    Namespace:urn:sample.com:I_Legacy_FileApplication
    Interface Mapping: UserMasterResultset_to_EmployeeEmail
    I created a Generic File Receiver communication Channel for my receiver BS: CC_FileReceiver
    In the target FileName field of the Communication channel, i would not like to hardcode any filename value, but my requirement is, the filename should be the same as the name of the Receiver Interface, that has been used in the message exchange.
    in my case, it should be something like EmployeeEmailProcessing_Inb.xml
    How can we access dynamically the interface related entries in the Communication channel, and how can we set those values in the Target Filename value of the File Receiver communication channel.
    in short, if i use the same communication channel for other scenario, the received filename should be different based on the receiver interface name that is executed.
    It would be even more better if i could access/set the receiver namespace value as part of the TargetFileName or TargetFileDirectory values.
    pls let me know how this can be possible.
    Thanks in advance,
    Madhu

    Hi Shabarish,
    thanks for your blog.
    After i saw the blog, the UDF can be created in ESR.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(u201Chttp://sap.com/xi/XI/System/Fileu201D,u201CFileNameu201D);
    String MyFileName = a + "_" + b +".xml";
    conf.put(key, myFileName);
    At this point, i can see that the required value is stored in certain key in the DynamicConfiguration.
    In the blog, i could not see anything related to ID.
    My question is, what do we need to do ID,
    when we create the FileReceiver Communication Channel, in that we need to specify the mandatory field "Source File Name". what value do we need to enter here.
    Are there any additional things do we need to do in Communication Channel in ID.

  • Problems Accessing Crossdomain.xml

    Ok, so ive been searching for a solution to my problem for 3 days now with no avail... hopefully someone here can help.
    Im building a website that i want to allow users to post jobs with or without an attached file...
    here is the site.... http://soengjobopp.dyndns.org/
    If you go to the POSTAJOB section at the bottom, fill in some test information, click attach to select a file from your machine, press and press submit you will see the error i get... ERROR 2049! (The file wont be attempted to upload until the form has valid data)
    I have a crossdomain policy on my root directory.....  http://soengjobopp.dyndns.org/crossdomain.xml
    Everything works fine when im testing it on my localhost, but when i try to upload from a machine elsewhere i get an error....
    Ive used Firebug(firefox plugin) to monitor the network when im at a client machine and it shows that the crossdomain.xml is trying to be downloaded from http://localhost/crossdomain.xml... i have no idea why... i allow administrators to download file from specific jobs and everything works fine... its just when i want to upload files i get an error... would anyone know why the site would try to get crossdomain.xml from its own local host and not from  http://soengjobopp.dyndns.org/crossdomain.xml ?
    Ive tried the "recompile with network monitor disabled" trick and i have the same problem.
    Ive also tried the Security.loadPolicyFile("http://soengjobopp.dyndns.org/crossdomain.xml ") and it still tries to get its policy file from localhost...
    If anyone could help it would be greatly apprecieated...
    Thanks!

    Hi Rich,
    I followed the steps in your video when our system was R/3 4.7 (WAS 6.20) and the test worked fine, i.e. accessing the crossdomain by typing http://server:port/crossdomain.xml.
    I followed the same steps with our new version (we're undergoing an upgrade) but I kept getting the error message:
    "BSP Exception: the BSP URL /crossdomain.xml Does Not Contain Any Application Entries".  Then I saw Ivan post suggesting implementing OSS Note 1260386.  I applied the Note but I got the same error message. 
    Then I ran function ICFBUFFER_INIT to make sure the buffer is cleared, cleared the cache in the browser and still got the same error message.
    Our system is ERP 6.0, NetWeaver 7.0, level 17 (BASIS Component is SAPKB70017).
    Please help.  Thank you.
    Achille.

  • JDBC MS Access--- cannot extract entry with null value with data type Meta

    I'm trying to extract a data entry with null value by using JDBC. The database is MS Access.
    The question is how to extract null entry with data type memo? The following code works when the label has data type Text, but it throws sqlException when the data type is memo.
    Any advice will be appreciated! thanks!
    Following are the table description and JDBC code:
    test table has the following attributes:
    Field name Data Type
    name Text
    label Memo
    table contents:
    name label
    me null
    you gates
    Code:
    String query = "SELECT name, label FROM test where name like 'me' ";
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next())
    String name = rs.getString("name");
    rs.getString("val");
    String label = rs.getString("label");
    System.out.println("\t"+name+"\t"+label);
    catch (SQLException ex)
    System.out.println(ex.getSQLState());
    System.out.println(ex.getErrorCode());
    System.out.println("in sqlexception");
    output:
    C:\Temp\SEFormExtractor>java DBTest
    yet SELECT name, label FROM test
    null
    0
    in sqlexception

    The question is how to extract null entry with data type memo?Okay, what you need to do is this:
    if (rs.getString("val") == null)
      // do something
    }This way, when it's a null value, you can check it first, and then handle it how you want, rather than getting an exception.

  • Can't create EJB from existing .java AND ejb-jar.xml entries

    I've noticed that I can create the source files for an EJB outside of JDeveloper, then I can do the "Create Entity Bean" thing, and specify the path to the source files, and it will use those source files, instead of forcing me to create them again.
    However, I've noticed that if I manually add the information to the "ejb-jar.xml" file, and then try to add the bean, it won't let me. I've found I have to delete the entry from the ejb-jar.xml file and let JDeveloper control the creation of the fields, even if I know exactly what needs to be set.

    If you are adding/modifying ejb-jar.xml outside JDeveloper and trying to see the changes.
    Save the ejb-jar.xml file which is being modified externally
    Select ejb-jar.xml in JDeveloper
    and do View | Refresh
    This will load in the changes (providing the source path has been set properly)
    raghu
    JDev Team

  • I am receiving the 'Could not sign you in [Access denied: 530]. Check your user name and password' problem on Adobe Muse CC 2014 and I cannot access the xml file that is supposed to fix this issue?

    I am a PC user and I have Adobe Creative Cloud Muse 2014. I have received the 'Could not sign you in [Access denied: 530]. Check your user name and password' error when trying to upload my muse site to my ftp host, GoDaddy. I have successfully done this in the past and only recently it has stopped working. I looked online at the FAQ Adobe Muse Help | Uploading an Adobe Muse Site to a third-party hosting service and it said to download the ftpprefs.xml file but this file simply leads to a blank page that says /*Not found*//*Not found*/.
    Can someone direct me to a working page with this file or provide a different solution? Thank you!

    Hello,
    As you are getting error [Access denied: 530] it means issue is with access. Either the username and password you are entering is incorrect or you do not have proper permissions.
    I would suggest you to contact Godaddy to either reset password or reset the permissions.
    Regards
    Vivek

Maybe you are looking for

  • Creation of Communication users in CUP

    Hi, Is it possible somehow to manage the creation of a non dialog user (i-e: communication) using CUP after the relevant request has been ended and approved? Thanks in advance. Best regards,   Imanol

  • EDI - Cross Company Codes

    What is the standard SAP process for sending cross company codes 850 EDI? We have 2 company codes on the same instance. Plant A in CoCd 5 buys parts from Plant B in CoCd 1 Plant A creates a Purchase Order (PO) and Plant B creates a Sales Order to cap

  • MIGO & MIRO Documents

    Hi, I am an SD consultant and can any one please guide me to see MIGO & Invoice number for a purchase order. In ehich T.code or anyways.. Thanks, Sree.Manam

  • 7.5.5 not recognizing a game application

    I have a lovely little copy of 7.5.5 running via Basilisk II. However, it doesn't seem to recognize the games I've saved over the years, specifically Odyssey: Legend of Nemesis. According to the game designer, the game should run in 7 and 9 neatly. W

  • BP Assignment

    Hi all,           could any one help me what is the  FM  for getting multiple assignments of BP in an organisational structure? Regards.