How to refer an xml file within a xml file?

Hi
I would like to refer a xml file within a xml file from where i would like to extracts some elements & attributes.
Plz, suggest me hot to do.
Thank you.

You mean you want to link the file thru some resource pointer and then make the external file availabe for parsing and other processing operations?

Similar Messages

  • How to unzip a zip file within another zip file

    I've got code that successfully processes a file within a zip file.
    But now the zip file can also contain other zip files. How can I
    process a zip nested within a zip without actually extracting the
    files? It looks like I need a ZipFile object to be able to take
    advantage of the zip classes for reading zip entries. But the
    ZipFile methods want as an argument an actual file, as opposed
    to some object in memory. I can read the 'inner' zip file into a
    ZipInputStream object, but then how do I make that available for
    processing as a ZipFile? I've searched all over and cannot find
    anything anywhere that talks about working with nested zip files.
    Does anyone have any sample code that does this? Thanks!

    I have successfully done it.
    You cannot have the code - it is proprietary.
    However here are a few pointers:
    o Use ZipStreams rather than ZipFile.
    o ZipStream is just a filter on a stream, so you can have a zipstream open, read a ZipEntry, then ask for a substream for the stuff up to the next ZipEntry. Put a second ZipStream on that substream.
    o As I recall you have to watch out that your inner ZipStream does not do a close. (Everything will get closed.) Instead, there is another ZipStream method that will close without closing all the underlying streams.
    Hope this helps.

  • How to read/unzip a specific file within a zip file

    Hi,
    I have a file within a zip file that contains a timestamp - I want to read this timestamp and then create a destination directory for the remaining zip files to be unzipped into. Since I know the name of the file with the timestamp in it I thought I could create a zipfile and use getEntry to get the entry but then other than getting the size and name of the file I can't do much more with it like read it unless I use a stream (zipinputstream) instead of a file (zipfile) - do I have this right?
    Does this mean to get the content I would have to loop through possibly all the files using the stream until I come across the one I want - then get the timestamp and loop through them all again to write them to the destination directory? Or am I reading this wrong - seems a bit round about.
    Any suggestions would be greatly appreciated.
    Thanks

    this works though - and you don't have to loop through all the files - just use the ZipFile:
    ZipEntry ze = zipfile.getEntry("path/to/file");
    BufferedReader br = new BufferedReader(new InputStreamReader(zf.getInputStream(ze)));
    line = br.readLine;Thanks!

  • How to open a popup win within a PDF file (c:\test.pdf) as Column Link

    I have a interactive report based on a Table (EMP). I need to create a column link that opens a pdf file within the employee curricula
    All the curriculum are stored in a windows folder, and in the EMP table there is a field named PATH containing the full path name.
    Thxs,
    Giuseppe.

    Hello, Sebastian
    I've tested your suggestion and in effect it works.
    I think is good solution if the files are readonly (pdf, images, etc).
    In my case the files are updatable by the end user.
    Consider that I'm using the following configuration:
    APEX 4.0, DB 11.2.0.1 and EPG
    This means that:
    a. All the files need to be loaded in the XML_DB via PL/SQL or via WebDAV (let's say in... /i/mydocs)
    b. When the end user opens the file via the "Column link" this is read-only in the browser, to modify it, the end user need to save updated version in (/i/mydocs), replacing the existing ones, .. and this is a bit complicated .
    Any other suggestion will be appreciate.
    Regards,
    Giuseppe.

  • Run a jar-File and modify a file within this jar-File

    I am running the jar-File, which contains my compiled java files etc.
    The program has a config part, which is saved in xml file.
    This xml file is in the same directory like the class files.
    All theses files are zipped as jar-File.
    Well, I am running the jar file.
    - But how do I open and save the xml file ?
    - Is that possible ?
    - How difficult ist that ?

    I tried to do this some time ago and found out the hard way that you can't, just as DrClap just told you. I would have taken his work for it anyway, but for what it's worth, I thought I'd mention that you're not alone. In my case I wanted to be cute and keep my properties all together within the .jar; thought it'd be cleaner that way. Ended up just creating the more typical class_name-props file in my home directory. Is this what you had in mind?
    ~Bill

  • Static files within a ear file     - help me if you can I am feeling down

    I am using oc4j.
    I have some static files (templates and configuration files for the applications) in an ear file.
    These files are addressed via web.xml init param and I use relative path.
    This works in my "working directory".
    But when I deploy the ear file the servlet cannot access the file (io exception file test/templates/temp.txt not found).
    Has anybody an idea how I must address the files in the web.xml?
    How can I address the files from /test level?
    Or is somthing wrong with the structur of the directory?
    my "working dirctory"
    appname/
    META-INF/application.xml
    test/
    web-inf/web.xml
    /classes
    /lib
    templates/temp.txt
    init-param
    <param-value>appname/test/templates/temp.txt</param-value>
    init-param
    <param-value>/test/templates/temp.txt</param-value>
    thanks in advance
    peter

    If these files are only accessed from the web module, then put these files in a subdirectory of the "WEB-INF" directory of the war file.

  • Problem opening a zip file within a jar file

    Hi,
    I have a jar file in a tomcat web server. The jar file includes a zip file which I've been trying to open with the following sentences:
    SpellDictionary dict = null;
    File f = new File(getClass().getResource*("us_US.zip"*).getFile());
    dict = new OpenOfficeSpellDictionary( new ZipFile( f ) );
    I'm getting this exception:
    2007-09-13 15:31:38 java.util.zip.ZipException: No such file or directory
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:203)
    at java.util.zip.ZipFile.<init>(ZipFile.java:84)
    at com.iir.newsAdministration.textEditor.TextEditorSpellChecker.<init>(TextEditorSpellChecker.java:62)
    If I run the application with the builded classes instead of the jar file, it works fine.
    Any ideas about how can I make it work with the jar file?
    Thanks in advance
    Natalie

    File f = new File(getClass().getResource*("us_US.zip"*).getFile());
    This is not going to work.
    What you need to do is create a Jar/ZipFile from your jar, then extract the ZipFile, put that in a temporary location, then open that with another ZipFile object

  • Linked .pdf files within master .pdf file won't open

    I have an 80+ page manual that I created in WordPerfect 12.  It contains 550+ links to .pdf files that I have in the same sub-directory.  Everything works fine when I use the master manual in its native WordPerfect format.  However, when I publish the WordPerfect master document to .pdf format, the linked files will no longer open in Adobe Reader 9.  Instead of opening the Reader program, it now tries to open my browser (Firefox) and open the file as an URL. This results in a error message.  I would really like to distribute my manual as a .pdf file instead of WordPerfect file.  Any help will be greatly appreciated.

    Hi,
    Could you let me know which version of Adobe Reader 9 are you using? You can try updating to the latest version ie 9.4.2 by doing a Help > Check for Updates.
    That should fix the issue.
    Alternatively, you could even download Adobe Reader X from ftp://ftp.adobe.com/pub/adobe/reader/win/10.x/10.0.0/en_US/AdbeRdr1000_en_US.msi
    Hope this helps.
    Thanks
    Ankit

  • How to call swf file within another swf file using xml

    hii,
    I am facing some problem to call a swf file via xml when this xml file loaded it calls another swf file which includes a new xml file. now if i call this nested swf calling without xml it works but in case case of xml it is not showing the result. i m confused. how to nested xml file calling done in as2/as3. i need some logics. thanks in advance

    This is the AS3 forum and your posting involves AS2 code.  You should repost in the AS2 forum...
    http://forums.adobe.com/community/flash/flash_actionscript
    Aside from that, your problem might lie in the following lines...
    _root.createEmptyMovieClip("sub_container1", 1);
    loadMovie(sub_SWFPath[1].attributes.url, "sub_container1");
    You create the new movieclip, sub_container1,  in the _root, but you do not assign the loadMovie to load into that same movieclip (unless you have a _lockroot = true assigned in your sub-swf).  In any case, you should repost in the AS2 forum to pursue resolution.

  • How to tell if a class within a jar file is being accessed?

    Hello,
    I have written a web app using NetBeans 5.5 and some external libraries.
    Rome 0.9 and a Rome module georss-rome.jar.
    Everything works fine with the integrated Netbeans tomcat 5.5...
    When I try to deploy this as a war using Tomcat 5.5 standalone It will not work properly. To make things worse, I get no error.
    In my code, I instantiate a class in the georss module by doing the following:
                    GeoRSSModule geoRssModule = GeoRSSUtils.getGeoRSS(entry);
                    if(geoRssModule != null)
    ...do something;
    }I then check for null and if not null I do stuff with methods within that jar.
    Basically I pass a rss feed or a georss feed. If its a georss feed then geoRssModule would not be null.
    As I said, this works fine within integrated tomcat but does nothing (no expected action) with standalone which leads me to believe that this is a deployment/jar/classpath issue.
    To me it seems that the class GeoRSSModule is never actually instantiated, but I never get any errors or expected output.
    I set tomcat logging.properties to FINEST for all types of logging.
    Is there a way to determine if the jar is even being accessed for that class file?
    TIA!
    BTW, I dont have the module source.
    I also verified that the jars (rome.jar and georss-rome.jar) are being deployed to webapps/myapp/WEB-INF/lib
    Message was edited by:
    gforty

    GeoRSSModule geoRssModule = GeoRSSUtils.getGeoRSS(entry);Try placing logging statements before and after this statement so that you can track execution. Make sure that your code at least gets to this particular line where you instantiate the GeoRSSModule object. Then place a logging statement afterwards to see if an object was indeed created.
    What helps me in situations like this is that I also use the NetBeans attached debugger listening on your standalone Tomcat installation. This allows you to trace your execution on the server side, one line at a time, giving you a clearer understanding of program flow.

  • How to refer the unlimited key length JCE jar files.

    Hi All,
    The JDK 1.4.2_10 contains the local_policy.jar and US_export_policy.jar that do not permit an unlimited Key length( 64 bit).
    - So I downloaded the unlimited ( Java(TM) Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 1.4.2
    ) https://jsecom15d.sun.com/ECom/EComActionServlet;jsessionid=0F59ACFF95A61F6C0E78B5CE8E0FA93B.
    -Now I want JDK to refer these files without changing anything in existing JDK ( Means I don't want to replcae the existing local_policy.jar , US_export_policy.jar ).
    - Is there any option or property which can tell the JDK to refer the other
    files instead of this location :- C:\bea\WLS8.1SP04\jdk142_05\jre\lib\security.
    Means I want to override these 2 existing files local_policy.jar , US_export_policy.jar without replcaing them.
    Any pointers will be highly appreciated.

    A year later, this is still an issue. No replies ( btw, this is my new login name for the forums ).
    Thank You.

  • Is it recommended to link an illustrator file within another illustrator file?

    Considering best practices for design reproduction... and that the linked file will contain a linked photoshop image.

    I believe once you link an image, wherever it goes goes the image, too.  Things get dicey when you move the image from where it was linked from, but if you have not moved the image and it shows it is still linked in the Links palette of the first Illustrator file ( which is placed into a new Illustrator document ), then the image remains linked.  So, to answer your question, no need to link again in the second file ( unless the link was somehow broken ).

  • Need to reference file name within the XML Output

    Not sure if this is possible, as I'm new to the livecycle/XML world. But I need to be able to reference a file within the XML output from the PDF.
    The Scenario is that a pdf form of a business card will be issued to 50 franchisees for them to type in their names and mobiles, click submit and the XML file to be sent to myself, and be imported in to InDesign populating their data ready for printing. Up to here I have it working perfectly.
    However as each franchisee have a combination of up to 5 logos to place in the bottom corner to save having to have various templates with different combinations of logos and having to ensure the correct templates are used. I intend to reference each companies combination as an EPS and make the reference within the xml out and have it import directly in with the other data. I can type the code directly within the xml but I would like to have the form reference it directly in the xml output. Is this possible or am expecting to much of livecycle? Any help/advice greatly appreciated.
    David

    Hi MadhavaGanji,
    I have post how to validate the file name, header row against definition table which stored the file name and column definition. 
    Take a look and see if this is helpful.
    http://sqlage.blogspot.com/2013/11/ssis-validate-file-header-against.html
    http://sqlage.blogspot.com/

  • Loading an xml file from an xml file

    I'm trying to load an xml file from an xml file, but I'm
    having problems. My first xml file is really simple - it only
    contains one attribute with the name of another xml file in it
    (eventually I will have multiple xml files in here and run a loop
    on them...this is why I want to load an xml file from an xml file).
    Currently, with the code below, I can get the main xml file
    to load ("main.xml"), but I cannot get the secondary xml files to
    load FROM the main.xml.
    I want to then take childNode values from the secondary xml
    file and use them within my .swf in text boxes and whatnot.
    Any guidance? I think I'm going wrong on the line where I'm
    saying "i.newxml.load(i.attributes.location);"
    - How can I get this to work?

    johnypeter:
    I tried changing the code inside the loop to use just
    "newxml" instead of "i.newxml", and I declared with "var newxml =
    new XML();" - was this what you were thinking?
    kglad:
    The reason I tried to use the loadXML() function in the loop
    was so that for each node in my "main.xml" it would load the new
    xml file listed - this is a no-no? Do you have any ideas as to what
    I could do?
    For the for-loop, what should I change in it? I'm not great
    with loops so I tried to modify some code from another loop I found
    in another forum thread - not the right way to do it here?
    Also, what should I trace? The value of the _root.address, or
    i.attributes.location? I have created dynamic text boxes on my
    stage to see if the correct value from the xml file loads (ie. the
    name of the xml file within the xml file) and it does, but now I
    don't know how to put that information into ANOTHER loadXML()
    function and get the node information from it - does that make
    sense???
    Below are the examples of the xml files I am using. In the
    first one, main.xml, I will have a list of multiple xml files, each
    with the same nodes and elements as in the details.xml file
    (different values, of course).
    This is just to give you an example of what I'm trying to
    accomplish - pulling ALL the addresses and phone numbers from
    multiple xml files. I cannot manually collect this information, as
    it is dynamic, and will be updated in each individual details.xml.
    I was hoping to collect the information by simply adding to and
    updating ONE xml file - main.xml.
    Do you think this can be done? Am I going about it the wrong
    way? I'm quite limited in AS knowledge, which is why I'm piecing
    together code from other posts!

  • XML within an XML?

    Hi. I was wondering if it is possible to have xml data within an xml. I used JAXB to generate the codes that I needed and have created a test application and test xml file. However, I get an error when I place the xml data between the xml tag. I want to be able to retrieve the xml data between the tags like all other data.
    an example of the xml portion that causes a problem is:
    <xmldata><samplexml>
         <name>Run an executable program</name>
         <type>3</type>
         <subtype>0</subtype>
         <description> specified executable program to be ran </description>
         <location></location>
    </samplexml></xmldata>
    I want to be able to retrieve and manipulate the data between xmldata. So far, I keep getting errors because the compiler is looking for an end tag for xmldata but finds a start tag for samplexml. I tried putting it in quotes, but that doesn't seem to work. If anyone knows of a way to do this, I would appreciate your help. Thanks in advance.

    nevermind... i think i've figured it out. for those who are wondering how to solve this problem, normally the following character "<" used as an element content would generate an error because the system thinks it is a start tag... in order to escape the reserved characters in xml there are predefined entitties that may be used. Predefined entities are a means for preventing the XML processor from throwing an error or refusing to parse your XML document. Therefore, you use them to represent characters that you don't want to be interpreted as markup.

Maybe you are looking for