Access xml file

Hello
I am creating a survey application.
In order to insert the questions i have craeted an xml file which will be part of the application assets.
How ever i am unable to access it using HTTPservice. I am  getting the following massage. How do i retrieve the information for the file?
Is there any other method besside HTTPservice?
Thanks
Amir

Or reference the file as the source for an XML object, eg:
<mx:XML id="xmlImageDatabase" source="gallery.xml"/>
did that in this example, same file loading principle
http://mattlefevre.com/viewExample.php?tut=flex&proj=Basic%20Gallery

Similar Messages

  • How to access xml file using c

    how to access xml file using c. are there any libraries regarding xml fastinfoset in c? Please let me know about any resources if u know? thanks!!!
    samitha

    There are different methods to access XML data which have pro's and cons. Let us know more about what you want to do and we can help you.

  • Access XML files from HTTP

    Hi,
    I need access XML file from HTTP. Server need parameters in the URL to generate XML files. For example, http://fileserver/xmlfile?orderid=123&custid=321.
    I created a XML Data Server in ODI 11g. The JDBC Url should be jdbc:snps:xml?f=<filename>&s=<schema>&d=<DTD>.
    However, it reports error when replaced the <filename> with "http://fileserver/xmlfile?orderid=123&custid=321".
    I found it's caused by ampersand of the HTTP Url. I guess ODI treat custid=321 as JDBC parameter rather than HTTP parameter.
    How to fill the JDBC Url in this situation?
    Thanks,

    i solved my problem by using the Socket object and controlling my file access by writing requests to the outputstream

  • Accessing XML files through java

    Can any one explain me the easiest way of accessing XML files from Java.

    Hi,
    If you want to only access the XML file, use the SAX parser It will be very easy to handle and identify the element and value.
    else if u want to change the XML value also, then better go with DOM, Which has very good flexiblity.
    use according to the need, let me know if any help is required......
    With Cheers
    PrasannA

  • Is XML adapter should be installed in BODS server in order to access XML files?

    Hi All,
    I have doubts while working withe XML/XSD files.
    1.Is XML adapter should be installed in BODS server in order to access XML files?
    2.What is startup_script.xml that we need to set up in Admin side.
    Thanks,
    Deepthi

    Hi Shiva,
    Thanks for reply. With out XML adapter I am able to load .xml file throght BODS using template XML. But I am notable to view the file properly like it is not showing schema.
    I doubt I need to check with XML source using BODS.But I have few doubts.
    1. XSD in local mechine and XML in Remote server (FTP).- In this case I am able to read the stucture of XSD.
    2. XSD and XML in FTP server-- In this case I am unable read the XSD structure from FTP server
    Please suggest how access XSD and XML in the job with out error.
    Thanks,
    Deepa

  • Flex Widget in Acrobat 9 access xml file

    Hi,
    I made a Flex application which accesses an xml file on my pc. When I insert the application in Acrobat 9, the data in the xml isn't loaded. I think that the Flash player in Acrobat 9 can't access the xml due to security reasons. Embedding the xml in the swf isn't an option because changes to the xml must be visible. What can I do to load the xml?

    I can view the xml file via web browser. one more thing is if
    i access the swf file under http request, it does work, say
    http://localhost/xxx.swf.
    Could tell me why i failed to run the swf file out of project/bin
    folder by double click ?
    Thanks again.

  • How to access XML files on public part of an external library DC?

    Hi,
    I would like to put xml and xsd files into a public part of an external library DC, so that I can access these files within other DCs. But I don't know the path which I have to use in the other DCs, e.g. for creating a File object from such xml or xsd files. What do I have to do to get this running?
    I'm using NetWeaver CE 7.2 for Java.
    Thanks in advance for your help!

    An External Library DC is only intended to include jars. Using a Java DC may be a better idea, unless you put your xml files into a jar first (but you'd need a Java DC for that...).

  • How to access XML files inside IDML?

    Hi All,
    How to access the different XML files like designmap, story, masterspread, etc. found inside the IDML files?
    Pl. help.
    Thanks,
    Praveen

    An External Library DC is only intended to include jars. Using a Java DC may be a better idea, unless you put your xml files into a jar first (but you'd need a Java DC for that...).

  • Help: Problems accessing XML file in WebSphere 3.5 Fix Pack 4 on Solaris

    We are having an emergent issue with WebSphere 3. 5 Fix Pack 4 on Solaris 2.6: The WAR file we deployed fails with runtime exception due to the inability
    to access a local resource(XML file) in the converted WAR file's web directory.
    The way we access this XML file is as follows:
    ServletContext theCon = getServletContext();
    URL u = theCon.getResource ("/web/test.xml");
    String newPath = u.toExternalForm ();
    InputStream is = new URL (newPath).openStream();
    The InputStream returned from the URL object is NULL.
    After checked the URL's externalForm string, we noticed that its protocol part is "classloader", e.g. the whole URL string is like "classloader:/opt/...../web/test.xml". However, if we replaced "classloader" with "file", the problem disappeared and the XML file can be read without error.
    Anybody know why "classloader:" in the URL string cause this problem, and what is the solution without changing the URL string?
    Thanks a lot!

    Hi,
    Can you try to replace the two last lines with:InputStream is = new FileInputStream (u.getFile());Hope this helps,
    Kurt.

  • Access XML File in JAR file

    Hi I am trying to access a XML file which is present within a JAR file. The xml file needs to be accessed from class files within the jar. The class files within the jar use the xml file as a config file.
    The jar is used by external programs during their runtime.
    Can someone help me with some info on where I can begin.
    Thanks

    DrClap, Thank you very much. It works. You certainly are a qualified Dr.
    Regards

  • HTTPService access xml files

    Hello,
    I am New to Flex2 and still reviewing the training videos,
    Flex 2 Essentials and Beyond the basics.
    I am trying to ready an xml file I created based on the
    example in the video.
    The sample application I am using compiles clean but returns
    nothing when run in the browser.
    I may ask some obvious questions, but I am coming from a C/S
    background and have not worked much with browser based
    applications, so all of this is new to me....
    Is there something that needs to be installed in order for me
    to make a httpservice call?
    Using Winxp pro Flex2 CF 7.0 I installed the default CF web
    server. Also IIS is running, not sure if I need both!
    I want to be able to import xml files into a grid or other
    controls before moving onto access data from a DB.
    Thank you,
    Roger

    Tracy,
    The code is right out of the Flex2 Essential training
    material. I just changed a few things to point to my xml file.
    here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    initialize="myService.send()">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var myData:ArrayCollection;
    private function resultHandler(event:ResultEvent):void {
    myData = event.result.ZipCodes.Zipcode;
    ]]>
    </mx:Script>
    <mx:HTTPService id="myService"
    url="data/zipcodes100.xml"
    result="resultHandler(event)"/>
    <mx:DataGrid dataProvider="{myData}" width="350"
    height="500" x="41" y="10">
    <mx:columns>
    <mx:DataGridColumn dataField="zip" headerText="Zip Code"
    width="100"/>
    <mx:DataGridColumn dataField="city" headerText="City"
    width="150"/>
    <mx:DataGridColumn dataField="country"
    headerText="Country" width="100"/>
    <mx:DataGridColumn dataField="areaCode" headerText="Area
    Code" width="150"/>
    <mx:DataGridColumn dataField="state" headerText="State"
    width="75"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>
    Also a sample of the xml file I am trying to import:
    <?xml=version="1.0"?>
    <ZipCodes>
    <Zipcode>
    <zip>00501</zip>
    <city>Holtsville</city>
    <country>SUFFOLK</country>
    <areaCode>631</areaCode>
    <state>NY</state>
    </Zipcode>
    <Zipcode>
    <zip>00544</zip>
    <city>Holtsville</city>
    <country>SUFFOLK</country>
    <areaCode>631</areaCode>
    <state>NY</state>
    </Zipcode>
    <Zipcode>
    <zip>00601</zip>
    <city>Adjuntas</city>
    <country>ADJUNTAS</country>
    <areaCode>787</areaCode>
    <state>PR</state>
    </Zipcode>
    </ZipCodes>

  • Error accessing XML file

    When i try to read an XML from a url outside my domain, i
    receive this sandbox error : [RPC Fault faultString="Security error
    accessing url" faultCode="Channel.Security.Error"
    faultDetail="Destination: DefaultHTTP"
    I understand this is under cross domain policies in Flash
    Player. Anyway, is there a technique i could read or load this XML
    file without getting the error?

    The web site that you are trying to read from must have a
    crossdomain.xml file
    in it's root that allows access.
    Below is an example that allows all access (fine for testing
    but not for production)
    <?xml version="1.0"?>
    <cross-domain-policy>
    <allow-access-from domain="*" to-ports="*" secure="true"
    />
    </cross-domain-policy>
    This must be in the root of the WebSever. Note that this
    varies based on the WebServer. For tomcat it is the webapps\ROOT
    directory.
    To verify that the policy file is in the root you should be
    able to see
    it by typing in a browser:
    http://myserver:myport/crossdomain.xml

  • Problem in accessing XML files using Web Start

    Hello,
    I am trying to run a swing based application, for which I am using Java Web Start. I have 3 jar files. One is ma_ui.jar which contains all my class files. 2nd is config.jar which contains all my xml and other image files. 3rd is classes111.zip for database access. When I try to run this application, the error it shows is application.xml is not in the classpath. But I am sure that application.xml is there in the config.jar. Can anybody help me out.
    Thanks and Regards
    Suneet

    It would help if you include a copy of your jnlp with this post.

  • Creating XML file in Project folder thru Java Program

    hi,
    i need one help. i need to create XML file in web://<Project Folder> in xmII thru Java Program. i created one java code and i am able to access XML file that is in c drive. i created jar file for this and placed as action block in Transaction and this working fine. but problem arises when i give file path in java code as web://<folder name>/file.xml which is in Web folder of project in xMII.
    How to access the file that is inside web folder from java code.
    regards
    senthil

    Hi Senthil,
    you can address the files that inside the MII workbench are viewed as "web://..." like this:
    http://<server>:<port>/XMII/CM/<Project>/<Folder>/<Filename>
    The workbench helps you find the correct filename:
    - open the WEB tab in the workbench
    - right-click on the filename
    - select "Copy Link" from the pop up
    Now you have the correct link in your clipboard.You can use the "web://" only inside MII.
    Michael

  • Access Denied error with basic XML file operations

    Hi,
    I'm trying to set up a basic read, write and delete code for XML files which I can build upon in the future. The three methods are bound to three buttons on the page and all three calls are awaited. Here's my code:
    Write:
    XElement uservarnodes = new XElement("uservars",
    new XElement("uservar1", "1"),
    new XElement("uservar2", "2"),
    new XElement("uservar3", "3"),
    new XElement("uservar4", "4"),
    new XElement("uservar5", "5"),
    new XElement("uservar6", "6"),
    new XElement("uservar7", "7"),
    new XElement("uservar8", "8"));
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    var file = await local.CreateFileAsync("uservarfile.xml", CreationCollisionOption.ReplaceExisting);
    var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.ReadWrite);
    using (var outputStream = stream.GetOutputStreamAt(0))
    DataWriter mydataWriter = new DataWriter(outputStream);
    mydataWriter.WriteString(uservarnodes.ToString());
    await mydataWriter.StoreAsync();
    await outputStream.FlushAsync();
    Read (outputs the data to a textblock):
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    var file = await local.GetFileAsync("uservarfile.xml");
    string readtext = await Windows.Storage.FileIO.ReadTextAsync(file);
    XElement uservarnodes = XElement.Parse(readtext);
    txtTarget.Text = uservarnodes.ToString();
    Delete:
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    var file = await local.GetFileAsync("uservarfile.xml");
    await file.DeleteAsync(StorageDeleteOption.PermanentDelete);
    When I tap each of the buttons once it all seems to work. But when I tap any of the buttons again within the same debug session I get an Access denied exception (E_ACCESSDENIED). Other people with this error had to await when calling their method, but I'm
    already doing that: private async void btnWrite_Click(object sender, RoutedEventArgs e) { await WriteToXMLFile(); }, etc.
    And the intervals between my taps isn't that short that you'd expect that the previously called method still had not finished completing. I don't understand why I'm getting the access denied error.
    Related to my question: I have added XML to the File Type Associations, File Open Picker and File Save Picker in the appxmanifest, but somewhere I read that you do not need to do this if you're working with local app data only. Is this true?

    var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.ReadWrite);
    I think because of your file stream hasn't been closed.
    by the way, it can be easier  by using System.IO.OpenStreamForWriteAsync extension method
    async public static Task<bool> SaveTextFileAsync(string filename, string data)
    byte[] fileBytes = System.Text.Encoding.UTF8.GetBytes(data);
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    var file = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting);
    try
    using (var s = await file.OpenStreamForWriteAsync())
    s.Write(fileBytes, 0, fileBytes.Length);
    return true;
    catch
    return false;
    (need using System.IO namespace)
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

Maybe you are looking for

  • Search function in iCal doesn't work

    Can't search in iCal. Notice other posts, but where's the fix?

  • Project Online Resource Management

    We will be using project online for Resource Management - managing the workload on many machines - and do this function across the team collaboratively. I was wondering how resources are managed in Project online. After loading tasks on my resources/

  • Add or subtract minutes from any time of day

    Hello! The problem I'm having is that add or subtract minutes related to a time stamp like e.g. + (plus) 17:21 timestamp minutes to add +80 result -> 18:41 - (minus) 17:21 timestamp minutes to subtract -20 result -> 17:01 Is any function module exist

  • Sometimes problem with my GPS

    Hi! My GPS sometimes goes wrong and doesn't show the right way. Can it be repared or it's better to change?

  • Data from Tiger to Leopard

    So I just managed to install Leopard on my MacBook. It required erasing everything first, so I backed up all of my documents and Tiger apps on my 500 GB Lacie Drive. Now I'm wondering what to keep. Some things are obsolete (they come with Leopard or