How to select variable filename from local directory with fn to load xml

I would like to select a specific xml file to load from a local directory. The file name is composed of “Title” + “number sequence”.  I know the Title (in this case its XLink07), but I need to select the latest number sequence or the latest by date stamp.
For example, the local directory has the following files:
XLink01[36735298100].xml
XLink02[36735298100].xml
XLink02[36735298101].xml
XLink07[36735298100].xml
XLink07[36735298101].xml
In this example I need to select file XLink07[XXXXXXXXXXX].xml where XXXXXXXXXXX is the highest number within the XLink07[XXXXXXXXXXX].xml files.  Title is Xlink07 and function should return Number sequence [36735298101]. Files with higher number sequence have later date stamps than files with lower number sequences. I need to select the highest number or the latest date stamp for the file that begins with XLink07….
My action script to load the local .xml file without any function to select the correct file is:
Security.allowDomain("*", "*")
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("XLink07[36735298101].xml"));
xmlLoader.addEventListener(Event.COMPLETE, showXML);
function showXML(e:Event):void {
XML.ignoreWhitespace = true;
var Innards:XML = new XML(e.target.data);
tweet_name.text = Innards.XLink01[0].screen_name;
tweet_1.text = Innards.XLink01[0].text;
tweet_date.text = Innards.XLink01[0].created_at;
Thanks for the help if anyone can script that function for me if its possible.

If you develop for Flash browser plugin (not AIR), there is no way to read directories.

Similar Messages

  • How can I fill structure from the line with contetnt of a XML file inside?

    How can I fill structure from the line with contetnt of a XML file inside?
    I have array of lines with XML documents inside. All XML's have the same structure.
    I need to fill array of structures (with the same structure like given XML's) from data of these XML's.
    How can I do this? I am trying Transformation with ora:parseEscapedXML, but receive error: "XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:processXSLT("Transformation_1.xsl", bpws:getVariableData("ProcessedFiles"))", the reason is javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Could not find function: parseEscapedXML.
    Please verify the xpath query."

    Ive posted the new code but now I'm getting a FileAlreadyExistException error. How do I handle this exception error correctly in my code?
    import java.io.IOException;
    import java.nio.file.FileAlreadyExistsException;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    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.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println(templateElement.getAttribute("name")+ ".xml");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      String fileName = templateElement.getAttribute("name") + ".xml";
      Files.createFile(Paths.get(fileName));
      System.out.println("File" + ":" + fileName + ".xml created");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

  • How to select and field from an table with similar value

    Hi Gurus,
          I got an requirement where i need to capture some values from an table whose value start with "vmr*"
    could anyone tell me the syntax to be used with this?
    My table contains valies like "lrt", "vmr'" nut i need only  values starting with "vmr"*
    Ravi

    Hi,
    In where clause, you can write,
    where field  like 'vmr%'.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • How can we read filenames from a specific folder

    Hi forum,
    I have a situation that, there are several files coming daily in a specific folder.
    I want to read filenames from that folder and want to get that filename in a variable.
    That filename contains account nos. which I need for further processing.
    Now, how can we read filenames from a specific folder with using Oracle PL/SQL Procedure?
    Please suggest.
    Thanks & regards,
    Kiran

    If you are on 10g (not sure which exact release I'm afraid) you might look at Chris Poole's XUTL_FINDFILES that lists the files in a directory using PL/SQL and DBMS_BACKUP_RESTORE.SEARCHFILES (all a bit undocumented as it seems to be provided as part of rman).
    The conventional (i.e. supported) approach is to use a Java stored procedure - there is an example on AskTom.
    Message was edited by:
    William Robertson

  • Anyone knows how to delete a file from a directory?????

    hi there
    anyone has any idea on how to delete a file from a directory? delete(String filename)? thank you.

    Hi,
    Check this link.
    Gives you an example code to show how to delete a file.
    http://examples.oreilly.com/jenut/Delete.java
    Hope this helps.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • How can i access filename from file (sender)

    hi All,
    can anybody tell me
    how can i access filename from file (sender)?
    thank u
    swari

    See:
    "SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean"
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    "Accessing Adapter-Specific Attributes through User Defined Function"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516

  • How to select the data from a Maintainance View into an internal table

    Hi All,
    Can anybody tell me how to select the data from a Maintainance View into an internal table.
    Thanks,
    srinivas.

    HI,
    You can not retrieve data from A mentenance view.
    For detail check this link,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    Regards,
    Anirban

  • How to select multiple values from a listbox

    Hi,
    I have a list box on my UI which is not allowing me to select multiple values
    I want to use multi select list box .. When i go to source of UI component and change that to select many listbox my page is not rendering it is giving error
    When i drag & drop the component i am unable to drop it as a multi select list box that option is not coming.
    I am working on Jdev 11.1.1.3 and I am using ADF/BC components
    How to select multiple values from a listbox ?
    Thanks,

    Hi,
    I want to use multi select list box .. When i go to source of UI component and change that to select many listbox my page is not rendering it is giving errorank
    And what is the error ?
    Frank

  • How to get Date Format from Local Object.

    Hi All,
    I am new to Web Channel.
    I need to know Date format From date of locale.
    suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC. 
    Is there any way to get Date format from "Locale" object. I should get date format for local object
    I get local object from "UserSessionData" object but how to get Date format from it.
    I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format.  I could not find example which show how to get date format from "Locale" object.
    Any help will be appreciated with rewards.
    Regards.
    Web Channel

    Hi,
    You can get it from "User" or "Shop" business object.
    Try to get User or Shop Business Object as shown below.
    BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
    User user = bom.getUser();
    char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
    If you are seeing "1,234.00" then above code will return "."
    I hope this information help you to resolve your issue.
    eCommerce Developer.

  • How to select multiple values from the parameters in BI Publisher report

    How to select multiple values from the parameter drop down in BI Publisher, and how to handle this mulitple values from the report sql...

    Hi kishore,
    I have used all the steps as you mentioned in your previous reply....including checking Mulitple Selection Check Box..
    Iam able to get the results when I am selecting one value..
    and also I am able to handle multiple values the in the query by using IN :Parameter, but seems when we select more than one value from the parameter drop down i think the Bi Publisher is sending the values in concatenated form something ilke
    ex: "'ACCOUNT','HR','SALES'" ,and when trying to display the parameters values in the output, its throwing the error as 'missing right paranthesis' ....on the whole do you have any solution which would handle
    1.Single selection.
    2.Multiple selection.
    3.'ALL' Values.
    4.Separating the concatenated string into individual strings and dispaly them on the output of the report..etc..in case of Mulitple selection.
    Ex:
    Concatenated String from BI Publisher:"'ACCOUNT','HR','SALES'"
    Expected Output on the report:ACCOUNT,HR,SALES
    reply to this would be much appreciated....
    thanks,
    manoj

  • How to select multiple values from the Parameters in the concurrent program

    How to select multiple values from the Parameters defined in the concurrent program...and i believe multiple selection is not a direct feature of EBS, but is there any workaround solution to acheive mulitple selection?

    I think there's no way to do that using standard feature.
    Some workaround I use :
    1. If the number of selections are fixed, you could use multiple parameters for the same valueset. For example :
    Selection1 : <choose first selection>
    Selection2: <choose 2nd selection>
    ..etc.
    If you don't use it then leave it empty.
    2. Use text varchar valueset and enter it manually and separate by comma (or other value) , eg : selection1,selection2,selection3....etc.

  • How to Select a value from DropDownByIndex -Urgent

    Hi All,
    I have dropdownbyindex UI elements in my Views, I get values from BAPI. When click records in a table, It goes to another view to display full record. Here i have dropdownbyIndexes So it should select one of appropriate value in dropdownbyindex based on record(Value) in table.
    Example:
    <u><i><b>In Table View</b></i></u>
    id                  title                 status          priority
    10000      webDynPro            New              Low
    <i><u><b>Detail View:</b></u></i>
    id                   10000
    title                 webDynPro
    Status             New                  [New,Old,Open,Closed]---DropDownbyIndex
    Priority            Low                   [High,Low,Medium]---DropDownByIndex..4m BAPI
    How to select Appropriate Values from DropdownbyIndex. if any one has sample code, that will be helpful.
    Note: I am using Model Nodes
    Thanks and Regards
    Ravi Golla

    Hi Ravi,
    In details view, you will have corresponding context node created for Status and priority dropdown fields.
    Let suppose, context node for Status is, StatusNode.
    value attribute inside this is,
    StatusNode
      |_ StatusAttrib
    Now, you need to write following code to set l_status ="LOW" value in it.
    wdContext.nodeStatusNode().moveFirst();
    for(int i=0; i<wdContext.nodeStatusNode().size(); i++)
        if(wdcontext.currentStatusNodeElement().getStatusAttrib().equals(l_status)
              wdContext.nodeStatusNode().setLeadselection(i);
              break;
    wdContext.nodeStatusNode().moveNext();
    write same code for priority also.
    Let me know if it is not working with you.
    regards,
    Bhavik

  • How to select multiple records from a TREE in the table

    HI,
    I have a tree structure which is in the table.When I open the node of the tree,all the subnodes are coming as one-one records in the table.I want to slect multiple record from this table.I applied onLeadSelect for this table,I can select only 1 record from the table.
    Can any one plz suggest me how to select multiple records from the table so that I can get all the data of those selected record.
    Regards
    -Sandip

    Rashmi/Kukku,
    First of all, Thanks for your help!
    Is there any other way in which we can access tables other than using BAPIs or RFCs?
    In my case, there is a table structure which has to be updated with values after validating a key. i don't think there is any RFC available now. do i need to create bapi/rfc for that?
    Krishna Murthy

  • How to select the vendor from the source list in the PO(me21n) screen ??

    Hi
    How to select the vendor from the source list in the PO(me21n) screen.
    Is there any Sources of Supply tab in the PO just like we have in the PR.
    I don't want a PO raised from a PR which has got the Vendor assigned to it already.
    Or the SAP doesnot provide the option of Source list/Assign source/Sources of Supply .....in the PO.
    Kindly reply

    There is not any facility available for Source Determination in PO. Only you can select the line item and click Menu Environment > Source List and view the list of sources available for the material but you can not chooss and assign. If you wan to assign the vendor then change the vendor already entered in PO and put the desired vendor.

  • How to select alternate entries from the database table

    Hi Experts,
    can u help me, how to select alternate entries from the database table.
    Thanks

    As there is no concept of sequence (unless there is a field specifically included for the purpose), there is no meaning to "alternate" records.
    What table do you have in mind, what data does it hold, and why do you want alternate records?
    matt

Maybe you are looking for