How to view raw XML in Safari

Is there anyway to view an XML document with both tags and data visible in Safari? Like what you get when you do a "View Source" on a parsed document. Mozilla based browsers just show the XML without parsing it ... that's kind of what we are looking for.

Up.

Similar Messages

  • Java SAX parser. How to get raw XML code of the currently parsing event?

    Java SAX parser, please need a clue how to get the raw XML code of the currently parsing event... needed for logging, debugging purposes.
    Here's and example, letting me clarify exactly what i need: (see the comments in source)
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
         //..Here... or maybe somewhere elsewhere I need on my disposal the raw XML code of
         //..every XML tags received from the XML stream. I need simply to write it down
         //..in a log file, for debugging purposes, while parsing. Can anyone give me a suggestion
         //..how can i implement such logging while the SAX parser only returns me the tagname and
         //..attributes. While parsing I want to log the XML code for every tag in
         //..its 'pure form', like it is comming from the server directly on the
         //..socket's input reader.
         if ("p".equals(qName)) {
              etc...
    }Than you in advance.

    YES!
    I've solved my problem using class RecordingInputStream that wraps the InputStream
    here is the class source code:
    import java.io.ByteArrayOutputStream;
    import java.io.FilterInputStream;
    import java.io.InputStream;
    import java.io.IOException;
    * @author Unknown
    class RecordingInputStream  extends  FilterInputStream {
         protected ByteArrayOutputStream sink;
        RecordingInputStream(InputStream in) {
            this(in, new ByteArrayOutputStream());
        RecordingInputStream(InputStream in, ByteArrayOutputStream sink) {
            super(in);
            this.sink = sink;
        public synchronized int read() throws IOException {
            int i = in.read();
            sink.write(i);
            return i;
        public synchronized int read(byte[] buf, int off, int len) throws IOException {
            int l = in.read(buf, off, len);
            sink.write(buf, off, l);
            return l;
        public synchronized int read(byte[] buf) throws IOException {
            return read(buf, 0, buf.length);
        public synchronized long skip(long len) throws IOException {
            long l = 0;
            int i = 0;
            byte[] buf = new byte[1024];
            while (l < len) {
                i = read(buf, 0, (int)Math.min((long)buf.length, len - l));
                if (i == -1) break;
                l += i;
            return l;
        byte[] getBytes() {
            return sink.toByteArray();
        void resetSink() {
            sink.reset();
    } Then here is the initialization before use with SAX:
    this.psock = new Socket(this.profile.httpServer, Integer.parseInt(this.profile.httpPort));
    this.out = new PrintWriter(this.psock.getOutputStream(), true);
    this.ris=new RecordingInputStream(this.psock.getInputStream());
    this.in=new BufferedReader(new InputStreamReader(this.ris));
    try {
         this.parser = SAXParserFactory.newInstance().newSAXParser();
         this.parser.parse(new InputSource(this.in),new XMLCommandsHandler());
    catch (IOException ioex) {  }
    catch (Exception ex) {  }Then the handler class looks like this (it will be an inner class, so you can access ris, from the parent class):
    class XMLCommandsHandler extends DefaultHandler {
         public void startDocument() throws SAXException {
              //...nothing
         public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
              // BEGIN - Synchronized logging of raw XML source code in parallel with SAX parsing :)
              byte[] bs=ris.getBytes();
              logger.warn(new String(bs));
              ris.resetSink();
              // End logging
              if ("expectedTagThatTriggersMeToDoSomething".equals(qName)) {
                   //...Do smth.
    }Edited by: patladj on Jul 3, 2008 12:30 PM

  • How to view "recent searches" in safari on ipad (ios7)

    Since the introduction of the unified search field, I can no longer view recent searches (previously accessed by clicking on the magnifying glass on the search field).  Note that I am not interested in the browsing history, I want to see a list of recent searches as this saves me having to retype my search query each time I want to display the search results.  Does anyone know how to display "recent searches" in safari on iPad with ios7?

    Thank you for your reply but unfortunately this doesn't address my issue. Typing in the unified bar brings up suggestions, bookmarks and history but this seems to be browsing history only (i.e. sites I have actually visited). I still need to retype my search query to display my search results again.  I wasn't aware you can't downgrade, isn't that a bit silly? What if there is a major fault or drawback with the new software, are users left with no option but to bear it? Also, upgrades should be an enhancement on a previous version, one would not expect to lose functionality or a feature by upgrading (especially when there is no option to go back)..it poses a risk in performing any future updates if I could potentially lose something I already have!

  • How to view TestStand XML results files

    Hi Gurus,
    We have used TestStand to save literally thousands of test results files in the XML format. TestStand allowed us to view a specific results file immediately after a test sequence, however I can't find a way to view the XML test results files otherwise. In other words, how can I view any one of a number of TestStand-generated XML results files using TestStand or otherwise (in an appropriate format/style) ?
    Regards
    Mike V

    Hi Ray
    its version 6.0.blablabla
    For some reason it doesn't find the stylesheet on the PC where its being launched from. i can fix the problem by editing the XML's stylesheet path within the xml file and putting style sheet in same directory as results, but I had to write a program to modify all the files because there were so many. Future files no problem.
    On another issue, we have thousands of results files stored in XML. Now I need to do some statistical analysis on the results but extracting the fields into a spreadsheet is a nightmare, I wish i'd used text files (database ultimate goal). Any tips here?
    Also, in TestStand there seems to be only one location allowable to store all results files. Ideally i want to store results files in product-specific directories, ie not put results for all UUT types in the same directory. Is this possible?
    Also, how can I append the word "Pass" of "Fail" into the results file name so you can tell at a glance if a test was passed without opening the file? 
    Regards
    Mike

  • How to view PDF files in Safari 5.1?

    Every time I try to view a PDF file in Safari 5.1.1 (double clicking or using the contextual menu)i, it downloads the file instead. Is there a fix for this?
    Adobe tells me that their plugin will not work with Safari 5.1 (with Lion or Snow Leopard) and suggests that I revert to Safari 5.0/Leopard.
    A.

    Go to /Library/Internet Plug-Ins.
    Move the PDF Browser Plug-In to the Trash.
    Restart your Mac. Try viewing a PDF in Safari.
    Known Issues | Adobe products on Mac OS 10.7 Lion

  • HT1677 How to view multiple websites on safari

    How can I view multiple websites (tabs) on safari?

    You can read King Penguins post for where the updating instructions can be found. You might want to read about the new features in iOS 5 as well so that you know what else you are getting into with this update.
    Ironically enoughy, many users were angry and disappointed about the new tabs in Safari, but yet you seem to want to use tabbed browsing. Be aware that the new Music App is decidedly different than the old iPod as well. No song lyrics, and some other features are no longer available in the music app either.
    I love most of the features of iOS 5, but you should take a look at what is in store for you if you update.
    http://www.apple.com/ios/

  • How to view PDF files in Safari

    Hi,
    I can't view PDFs in Safari since updating to 5.1.  I just get the annoying dark-grey screen
    I don't have Adobe Reader/Pro installed, I don't have the internet plugin, I have tried running the phrase in Terminal that is supposed to tell Safari to open PDFs not get another program to (cut and paste into terminal as is from various other threads) and I have tried downloading the file form this address: http://www.macupdate.com/info.php/id/22361/safari-display-or-download-pdf-files (incidentally, I can't download it because Safari tries to open the .dmg file in a new tab, but that doesn't work, nor does OPT-click -> Download linked file allow me to download it).
    I've been to the Genius Bar at that local Apple store and the tech couldn't help - even though she looked at the problem for about 30 mins.
    Does anyone know of any other possible fixes for this incredicbly annoying problem?
    Cheers
    Sean..

    Please enable guest logins and log in as Guest. Test. Same problem?
    Mac OS X 10.6 Help: Creating a guest user account

  • How to view image properties in safari

    I would like to view properties of an image on a web page in Safari and cannot find this option anywhere.  I think it used to be under "View".

    Control click the page in Safari then click Inspect Element.
    Select Images on the left.
    Click through the images in the list. You'll see image properties on the right.

  • How to view webpage films with Safari

    Hello all!
    I have offered me a new iMac (yes yes the 5K one) for Christmas :-)
    At the very beginning viewing spiegel.de I could see the little video files. But now it has gone, like on my laptop.
    I changed some settings in the Preferences. But I am unable to bring the capability back, to watch mp4 content ...
    Any ideas? I would be grateful for a hint, because I don't want to download Chrome to watch web films again nor install the Adobe flash player.
    Best greetings - have nice holidays!
    marek

    Thank you Allan!
    Finally an answer All others are celebrating Christmas I suppose.
    Funny enough, when I first started Safari and my news page spiegel.de I clicked just for fun on a linked video and it was working in Safari! I thought: fantastic I don't need to download Chrome to watch some videos in the net. But then I changed some security settings in Safari Preferences. And it was not working any more. ( And Adobe Flash I refuse to download - don't ask me, if you want to celebrate your evening again ... )
    I will try to find it on myself. I keep you informed, if I find the culprit!
    Have a nice and happy evening
    marek

  • LR4 How to view RAW+JPG files?

    Hello --
    I have been wondering about this for quite some time. I know there is the option to "treat jpg as seperate files" in the library, but i feel it clutters up the library so i tend to avoid this. However, if i treat them as the same, the JPG does get saved into the hard-drives directories, but it isn't visible at all in LR. I understand that this is by design, but what is the point of it then, if there is no way for me to look at the jpg (e.g. for comparison).
    so my question: is there a way to see the jpg file, unless i treat it as a seperate file (and hence de facto duplicate the number of images in my library)? what i am looking for, is occasionally being able to view that jpg that has been saved to the directory.
    thanks in advance for your reply.
    patrick.

    i agree with you and understand your point. my problem is that the auto-stacking doesn;t seem to work all the time properly, and i would have in that case to manually go through a rather large set. i am wondering if i may just be best off importing the files as the same and not seperate since this will ensure that the jpg's are at least archived. if i then need to look for one, i can always somehow grab it out of the catalogue. not exactly ideal, but may be adobe eventually will make it easier to access the jpg....

  • HT3825 How to view RAW from Canon 5D mark III for OS 10.6

    To 'Preview' RAW files from Canon 5D mark III, it is known that you need to install the Digital Camera RAW Compatibility Update 3.12 , but it can only be used with iphoto 9, which in turn only work in OS 10.7, so there is no way for 10.6 users to 'Preview' the RAW files? Please help if you no any other ways, thank you!

    Which Adobe program?
    Which version?

  • How to view AR dunning letter XML file (raw data)?

    Hi,
    Can anybody tell how to view AR dunning letter XML file (raw data) as I like to modified the dunning letter and like to know which fields I can add to our dunning letter layout. thanks.

    Hi
    These are the steps you need to do to get the output in XML Raw format.
    Step 1
    1- Go to System Administrator -> Concurrent -> Program - Define
    2- Query the Dunning Letter Print
    3- Set the format output as XML
    Step 2
    1- Ftp Oracle E-business suite Server
    2- Get the file ARDLP.rdf from $AR_TOP/reports
    3- Open the report using Oracle Reports
    4- Change the output to XML.
    ARDLP.rdf is a report provided by Oracle Corporation so it is a good idea to make a backup of the same,
    before making any changes. Hope this will help.
    Regards
    Ali

  • How export to csv work in safari browser? In my application export to csv open like a raw data in new tab. But other browsers working great!. Need to open in a csv file or save it as a csv file.

    How export to csv work in safari browser?
    In my application export to csv open like a raw data in new tab.
    But other browsers working great!.
    Need to open in a csv file or save it as a csv file.
    Please suggest me. Thank you in advance!.

    Hi Adrian,
    Why don't you try any another software for opening CSV files then Notepad ? According to my experience, you can use these softwares to open an CSV files and they are:-
    Microsoft Excel
    Open Office Calc
    Google Docs
    Also there is an additional tool available known as CSV viewer. You may try this, download it from here http://www.csvviewer.com/
    I've never used Notepad for opening CSV files, because sometimes it contains some symbols which are not not at all compatibile with Notepad.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How can i view multiple windows in safari? I used to do it with the 3 finger sliding, but that feature is gine now. please help

    how can i view multiple windows in safari? I used to do it with the 3 finger sliding, but that feature is gine now. please help

    Try a 2 finger Pinch to see the tabs.

  • HOW DO I VIEW PDF FILES IN SAFARI 5.1.7

    HOW DO I VIEW PDF FILES IN SAFARI 5.1.7?

    I had the same problem... I have installed PDF Browser Plugin Version 2.4.4, and it works very fine !
    http://www.macupdate.com/app/mac/9542/pdf-browser-plugin

Maybe you are looking for