SAX and DOM - treating encoding differently ??

Hello!
I have run into a strange problem - I was parsing my xml document using
WebLogic's DOM and SAX parsers to compare their performance, and I found
that while using their DOM parser I was able to parse the document just
fine, using the SAX parser gave me an error:
org.xml.sax.SAXParseException: Declared encoding "UTF-8" does not match
actual one "ISO8859_1"
I don't use any extended characters in the xml document, and even if I
did - I'm puzzled as to why DOM parser would process it without
complaining but the SAX paser would not??
Thanks,
Marina

Hello!
I have run into a strange problem - I was parsing my xml document using
WebLogic's DOM and SAX parsers to compare their performance, and I found
that while using their DOM parser I was able to parse the document just
fine, using the SAX parser gave me an error:
org.xml.sax.SAXParseException: Declared encoding "UTF-8" does not match
actual one "ISO8859_1"
I don't use any extended characters in the xml document, and even if I
did - I'm puzzled as to why DOM parser would process it without
complaining but the SAX paser would not??
Thanks,
Marina

Similar Messages

  • "Right" way to mix SAX and DOM in app

    I'm writing a standalone desktop application that reads and stores data as XML files. Eventually, it might be converted to use some web services, but it's not a priority right now.
    What I need to do is to use an XML file, which could be large, as kind of a database -- there are many entries, each with a unique identifier, and the application will query the file to find those it needs to match and returns those as objects I'm mapping.
    At the moment, because this is a personal project and I'm using it to learn more technologies, I'm trying to (somewhat artificially) restrict myself to the pure Sun APIs. So far, my investigations have pointed to JAXP (by including Java EE 5 libraries) with StAX (including JAX-WS). Which raises two questions:
    1) To do this "right", do I really need to bundle my app with the entire JaveEE+Metro stack?
    2) Is there a better solution than StAX that's fully Java 5 compliant, even if it means stepping out of the Sun box? I haven't found many references to other solutions that are more recent than 2004. Is parsing XML on an app that has nothing to do with an appserver that uncommon?

    More likely than not, I won't be abstracting to that degree. If the current structure isn't right, I'd update the app instead of storing that kind of information in more files.
    I imagine at this point an example would be more effective. The app is itself more of an inventory browser that can jump around different searches dynamically. As an illustration, imagine that it's an inventory for DVDs. One central file will be your collection (with each entry containing a movie ID, date of purchase, etc). Another file would be more static, a list of DVDs themselves. These entries would contain information about the package itself -- how many discs? What's the title of the package? Which special features does it have? It would also point to an entry in yet another file which would have information about the film, containing biographies of the people listed under the movie credits.
    Basically, I want a flatfile database that I can do joins on that are split up into different files. There are few files (here, one) that will be constantly updated by the user. The others could be modified if needed, but it's not going to be optimized for it. (For example, you could own a DVD that nobody's ever heard of, and put in the info yourself.) Periodically, one or more of the more static files is updated and will be downloaded into the app.
    One of the advantages I see for this is that, in the future, I could with few changes turn this into more of a web service. Instead of pushing changes in those few files, the app would look to a web service for the data it would now find in files on the user's hard drive. But for now, it also has to be one standalone package.
    To answer the question, the file that will most commonly be updated by the user is the one that I don't have problems loading into memory in full. It's the other data that it links to which I want to be able to search and load into objects dynamically. My current implementation is to run the file through SAX and grab the data as it sees it, but it's really ugly. That could very well be how I'm using it and not because I'm trying to shoehorn some functionality into a technique it doesn't fit, but I'd like to find that out. ;)

  • Can I Use  SAX  and DOM in same application?

    Hi,
    Here is my requirement. I am using Apache's SAX parser for my appliaction. The below xml is the sample xml i am processing.How can I know the parent of element 'C' using sax? Is there any way i can differentiate the element under <B> and under <A>? Or do i need to use DOM, when you encouter <C> and find out it's parent.?
    If any one had this situation,Please respond with some code examples.
    <A>
    <B>
    <C>aa</C>
    </B>
    <C>bb</C>
    </A>
    Thanx

    When using SAX, your application is notified about nodes as the parser encounters them, sequentially. There is no concept of a parent/child relationship for elements. When using SAX, you must develop this logic yourself.
    When using DOM, the contents of the XML file are read into a tree structure. If you have a reference to the node object that represents "C", you can get a reference to its parent by calling getParentNode().
    Hope this helps.
    Greg
    >
    Hi,
    Here is my requirement. I am using Apache's SAX parser
    for my appliaction. The below xml is the sample xml i
    am processing.How can I know the parent of element 'C'
    using sax? Is there any way i can differentiate the
    element under <B> and under <A>? Or do i need to
    use DOM, when you encouter <C> and find out it's
    parent.?
    If any one had this situation,Please respond with
    some code examples.
    <A>
    <B>
    <C>aa</C>
    </B>
    <C>bb</C>
    </A>
    Thanx

  • In Java Mapping Whether to SAX or DOM ?

    While implementing Java Mapping which of the following SAX , DOM parsers  is the most efficient way to implement it.
    I mean considering the voulume of data in the XML format is large which  usage will give me most  optimal performance .
    It would be nice if someone could give a sample most  optimal java code using JAXP where  input stream is read  and after  processing written to  output stream.
    regards
    Nilesh Taunk.

    Hi Nilesh,
    >>>While implementing Java Mapping which of the following SAX , DOM parsers is the most efficient way to implement it.
    there's no one good answer fot this question
    except: it depends:)
    SAX and DOM are a little different parsers
    so it depends what will your java mapping
    have to do: if it will change the
    structure or maybe it will only change a few tags,
    or maybe it will do something else
    have a look at the page below to read a simple
    comparision between SAX and DOM
    http://www.scit.wlv.ac.uk/~jphb/cp2101/week4/XML_Parsing.html
    or this thread:
    http://www.biglist.com/lists/xsl-list/archives/200301/msg01318.html
    they will give you some idea which one to choose
    depending on your requirements
    BTW
    remember use java mappings only
    if you cannot use graphical mapping (very easy debugging)
    and if your document cannot be parsed (maybe huge documents)
    with XSLT which is supported by many graphilal tools
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • NTLM and ADFS claim treated as different user

    Dear All:
    Currently our SharePoint is using mix authentication mode (claim mode with two authentcation providers):
    Windows-NTLM & ADFS2.0
    The ADFS'a identity store is same as SharePoint's domain, it means we have only a single AD, NTLM authentication provider is used for users who are in office, ADFS authentication provider is used when they are at home. (The same credential)
    When users opens SharePoint, it prompts a page to let user to select which authentication provider they want to use (NTLM or ADFS).
    The question is when the same user login by using NTLM or ADFS, the user will be treated as a different user
    For example:
    UserA login by using NTLM, his identity claim looks like: Domain\UserA
    UserA login by using ADFS, his identity claim looks like:  i:05.t|saml provider|[email protected]
    The profile and permissions of this user will be different
    Is there a way to treat the user as the same user no matter login by ADFS or NTLM ?
    I know if we remove the NTLM authentication provider, only use ADFS can solve this problem, but the client don't want to do this, because:
     The SharePoint is upgraded from 2007 (Classic mode) and it has a huge number of existing users, resources, permissions.
    After upgraded to the claim mode, SharePoint automatically used the NTLM authentication provider.
    If we removed the NTLM authentication provider, the client has to reset all permissions in SharePoint again, for example:
    A ListItem's Permission:
    1. In SharePoint 2007 Classic Mode:
    Domain\UserA -- Full Control
    2. After upgraded to SharePoint 2010 and upgraded to Claim Mode, the client didn't need to reset the permission:
    Domain\UserA -- Full Control
    3. If we remove the NTLM authentication provider, the client have to reset the permission:
    i:05.t|saml provider|[email protected] -- Full Control
    Any ideas would help,
    Thanks a lot!

    SharePoint sees the Windows and Claims identities as different, even though they are the are the same user in the same directory store.
    I'm troubled by the SAML token though, if it was a claims windows token (i:0.w) I would say you could use Move-SPUser to consolidate them. I've done this
    before when during configuration of a farm a user can appear with duplicate entries in the site, one for windows auth (DOMAIN\user) and one for claims (i:0.w#domain\user).
    Move-SPUser can merge the SPUser objects together (this was one of the purposes of it's predecesor, the migrateuser stsadm operation). If it was a windows token it works, but because of the ADFS provider it could be strange.
    Here's how I would test it out:
    Create a new test user (no sense in messing up a real user)
    Log test user in to the site with NTLM
    Log out test user
    Log test user in to the site with ADFS
    Log out test user
    With an admin account, verify using the method you previously used to determine duplicates that there are indeed two users for this test account (one windows, one SAML). 
    Move-SPUser (details below)
    Verify there is now one user for the test user
    Log test user on to the site with NTLM
    Log out test user
    Log test user on to the site with SAML
    Log out
    With an admin account, verify again to make sure there is still only one account
    For Move-SPUser and windows claims I would usually recommend merging the windows account into the claims. Without knowing what will happen I'd say let's try the same here (merge the windows account into the SAML claim):
    $testUser = Get-SPUser -Web "http://sitecollection/or/site" -Identity "DOMAIN\testuser"
    Move-SPUser -Identity $testUser -NewAlias "i:05.t|saml provider|[email protected]" -IgnoreSID
    Jason Warren
    Infrastructure Architect
    Habanero Consulting Group
    habaneroconsulting.com/blog

  • NetBeans problem: Issue with servlets and Chinese character encoding

    Java Version: JDK1.5.0_01, JRE1.5.0_01 (International version)
    Netbeans Version: Netbeans IDE 4.0
    OS: Windows XP Personal Edition
    Dear Sirs,
    First at all thanks for reading this post. I am having the following issue. I am creating an application using html pages and servlets. I am using Chinese and English languages on them (html encoding UTF-8).
    I created a project in Netbeans and added an idex.html screen reporting to a servlet. Both index.html and in the servlet generated html page contains the line:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    Additional, I setup the character code settings in Netbeans:
    (tools-options-Java sources-Expert-default encoding=UTF-8
    When I run the project, index.html displays itself perfectly, with the Chinese characters displayed properly. The problem comes when the html created servlet is displayed, which instead of the Chinese characters some strange characters are displayed (�� instead of Chinese).
    I have tried different encodings from http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html without any luck. I also setup the encoding of the file itself (using right click-properties in the project menu of Netbeans).
    Also, when I am editing the servlet, the characters are displayed properly. I type them directly without any issue, but then the display is wrong at runtime.
    Also, just in case this have something to do with the problem, my PC was bought in US, therefore the default character set is not Chinese. I had to install the Chinese typing stuff later on. But like I said earlier, the html page is displayed properly, so I really think is some problem with Netbeans.
    After a week trying to find a solution, I decided to post it here in the hopes that someone will show me the way of the light.
    Thanks in advance for any ideas or help provided
    Aral.

    Ok, I found out some problems with Netbeans as well.
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response)
            throws IOException, ServletException
            response.setCharacterEncoding("UTF-8");
            request.setCharacterEncoding("UTF-8");
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            byte[] st = {-25,-75,-124,-27,-100,-106,-17,-68,-102,-27,-80,-113,-27,-72,-125,-26,-118,-75,-26,-105,-91,-27,-82,-93};
            out.println("this works: ");
            out.println(new String(st,"UTF-8"));
            out.println("<br>");
            out.println("this doesn't: ");
            out.println("some chinese copied from the Internet<br>");Right click the .java file and choose properties -> encoding UTF-8
    Then I make a copy of the .java file, rename it to html and open it with IE sure enough
    the Chinise is allready unreadable (not it's still readable in the IDE);
    When I compile the file with F9 I get the following error:
    whatever.java:101: warning: unmappable character for encoding Cp1252
    Tried to set the encoding to UNICODE but then the file doesn't compile.
    I gues you have to download the Japanese version for it to work correctly.

  • XML - SAX or DOM?

    Hi folks,
    I'm on the verge of emotional breakdown trying to get my head around working with XML in Java, and I would really appreciate a bit of help.
    What I would like to do is to store database metadata in an XML file.
    The steps I have taken so far are to read the metadata into a structure of objects (a metadata object that containts arraylists of tables objects that contain arraylists of columns object. Each of these object types holds information about the table or column concerned (table name, column type etc).
    I'm stuck when it comes to deciding whether to use SAX or DOM to write / read these files.
    Now, I understand that SAX is for sequential access, and DOM is for situations where you'd like to manipulate the XML tree. I guess that, given the nature of my data structure DOM would make more sense? Then I can define a node for each table, then off them, define a node for each column... Or am I missing the point here?
    Can anyone give me a nudge in the right direction?
    Thanks in advance
    s.

    Thanks for replying!
    Duffymo, I'd rather keep the xml content to the data
    to make the files easy to edit / write by hand.Not following you here.
    I understand that you want XML files, but XStream can take them and turn them into Java objects for you. Conversely, you can take a graph of Java objects and serialize them as XML.
    No worries about DOM or SAX that way.
    %

  • Premiere Pro and Adobe Media Encoder running slow

    Hello everyone,
    I'm having trouble with CS4, which is running significantly slower than CS3 did on a older machine. The CS4 suite is installed on a Dell Precision M6400:
    Windows Vista 64-Bit
    Intel Core 2 Duo CPU T9400 @ 2.53 GHz
    8 GB RAM
    NVIDIA Quadro FX 2700M Graphics with 512MB dedicated memory
    The OS is running on a 57.5 GB HD (C:) and the Adobe suite is installed on a 298 GB Solid State HD (D:), except for Adobe Media Encoder, which is installed on the C: drive.
    My project has 4 15-16 minute sequences. The sequences are in DV NTSC, 29.97 fps,  My scratch disks are set to a folder on the C: drive. Media Cache Files and the Media Cache Database points to a folder on the D: drive.
    These are some of the problems I'm having:
    - Premiere Pro CS4 generates peak files every time I open a project
    - It then takes 3-5 minutes to render before I can preview a 16-minute sequence
    - Adobe Media Encoder takes 5 hours to render a 16-minute sequence (as flv) that has been previously rendered
    - AME takes 1 hour to render every 15 minute sequence that has never been rendered before
    Are my settings affecting their performance? Is there any way to improve it? Thanks.
    (Premiere Pro is the only app that is slow)

    The data rate for replay is one thing, the data rate from disk to memory then from memory to CPU and back the other way are different matters and ought not to be confused. It is well-established that for a computer to edit AVCHD you need top end components, and note that I said there were three tasks to distinquish with increasing hardware requirements, namely merely replaying the video, specifying edits in the editor and then the rendering. It is commonly accepted by all the industry vendors that to do remotely commercial AVCHD rendering you need a minimum Quadcore CPU then that eats data fast, in order to not let it go to waste you need a fast motherboard bus fast memory and in order for none of those to go to waste you need the fastest disk set-up you can manage. I in fact have a 4-disk RAID0 volume using SATA (I think the disk model is SATAII but I have to await return from the repair center before I can confirm). For this RAID0 volume I have run speed test software from BlackMagic because I have one of their HDTV capture cards. It recorded that this volume which remember is doing parallelised IO is just fast enough to receive a encoded HDTV stream from the BlackMagic card but too slow to receive an uncompressed HDTV stream, indeed when I tried both I found the volume did keep up with compressed but fell behind with uncompressed. Remember that with a RAID0 volume of 4 SATAII disks a given file gets spread over the four disks and hence IO is spread over those 4 3G/s data lanes. Also remember with these disks 3G/s is just a burst speed, for AVCHD we are interested in sustained serial IO which is much less.
    Before my machine broke down, I found that it took 5 hours to render 33 minutes of HDTV albeit as it went along it transcoded from AVCHD to a Microsoft HD format for Vista-only. Another interesting thing is that I found that the longer this render ran the slower it became, the estimated time started at 3 hours but the actual was five and the last one third took maybe 3 hours. Because the machine broke after that run I couldn't figure the bottleneck. For my machine bear in mind that at the repair shop we found that the Quadcore had only half the necessary electrical power plugged in, the monitor software showed however that it constantly ran around 90% of whatever capacity that reduced power supply permitted. Now then we can puzzle over why it got slower and slower and yet CPU consumption remained consistent and near to full capacity, memory was not the bottleneck because that was constant at 6.4G. But you can say that this was maybe performing like a Dualcore and was hitting some sort of wall, if you had a 1 hour render with that rate of degeneration of performance factored in what would happen to the render time, and for 3 hours you could be running indefinitely. I hope when the machine comes back the correct power supply will make it behave like a Quadcore should for this type of application. Anyway I have two theories for the degradation. First is just that PrProCS4 was getting its knickers in a twist and thereby just doing more computation per minute of video to be rendered as time went by, maybe internal resource management related to OO-type programming maybe, or related to disk IO falling behind, both these theories have problems, for the latter the CPU usage should then have dropped also.
    Anyways, you need really a Quadcore system and blazing fast disk to work fully with AVCHD commercially, we found an external SATAII disk so if I were you I would just go get one and move on with your life.
    Message du 03/06/09 16:08
    De : "Jim Simon"
    A : "JONES Peter"
    Copie à :
    Objet : Premiere Pro and Adobe Media Encoder running slow
    For AVCHD you MUST have FAST disks.
    AVCHD actually has a lower data date than DV. You need lots of CPU muscle, but disk speed is really not a factor specific to AVCHD. Anything that works for DV will work just as well for AVCHD (and HDV as well).
    >

  • How do I know if my Edge Animate compositions will scale up or down to fit each mobile phone platform's resolution? iPhone 3s, 4, 4s, 5, and 5s all have different resolutions. Do I use .png or svg?

    I want to use Edge Animate to create native app in PhoneGap Build. How do I know if my Edge Animate compositions will scale up or down to fit each mobile phone platform's resolution? iPhone 3s, 4, 4s, 5, and 5s all have different resolutions. And do I use .png or svg?

    If you use responsive scaling it will definitely scale .
    For best practises regarding graphics refer
    Edge Animate Help | Best practices for graphics in Adobe Edge Animate

  • Development and Quality server using different screen color setting

    Hi,
    I want to differentiate the Development and Quality server using different screen colors,
    How can I set different color logon screen for the different kinds of servers.
    Thank You.
    Best Regards,
    M.Thirumoorthi
    [email protected]

    Hi Thiru moothi,
    Please check these links :
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/ep/modifyingtheLogon+Page&
    Custom Password Change Page
    Custom Portal Logon Page
    Reward points if handy!
    Cheers,
    Sandeep
    Edited by: Sandeep Tudumu on Mar 26, 2008 7:41 PM

  • How to get Apple ID and password that is different to iTunes store account which I have already activated and completed contracts, tax information and bank information I want to create a Paid Books Account use apple ID

    I was given this address from the Apple customer support team.
    I have an active existing iTunes store account and use the same Apple ID for signing into my iTunes Connect Account that distributes Apps.
    I have created some books using the iBook author and in order to distribute content on the iBookstore I have been told electronically that I need a new Apple ID and password that is different to iTunes store account which I have already activated and completed contracts, tax information and bank information valid until 2013?
    I want to create a Paid Books Account using the same email address, tax information and bank information. This has been most frustrating, as I cannot get passed the sign in section and there is no contact person I can speak to. I was of the understanding the iTunes connect account and the Developer programs which I paid good money for is all what I needed to be paid for selling iBooks on the iBookstore???
    I only have one email address and wish to also use it for the Paid Books Account. I have books ready to be exported and published.
    I am also having trouble locating and downloading iTunes Producer. I understand I need to have the Paid Books Account active to access the iTunes Producer program. Please help.
    See additional information below:
    What device did you use to connect to the store?  Mac computer
    Which operating system is installed?  Mac OS X v10.7.x
    What version of iTunes is installed on your computer?  iTunes 10.6
    Choose the iTunes Store or App Store for your country:  Other
    Please select your country:  Australia

    Hi Lrwill,
    If the apps that are on your son's iPad were purchased under his Dad's Apple ID, then signing your Apple ID onto the iPad will not help you with updating those apps.
    Also, if the iPad was sync'd with his Dad's iTunes library, then hooking it up to your computer/iTunes library, will require you to reset the iPad, and everything that was loaded under the other Library and Apple ID will be wiped out.
    Can you provide a little more info about what was set up under which Apple ID and what iTunes library the iPad was sync'd with?
    Cheers,
    GB

  • My wife and I have two different iCloud accounts. How can we share the Address Book?

    My wife and I have two different iCloud accounts. I have an iMac OS X 10.7.5 and she has a new iPad.  My Address Book is on iCloud but when she enters a contact on her iPad it goes to her Address Book. We want it to go to mine. We want to share my Address Book on iCloud. How can we do that?

    You're welcome.
    Happy Holidays to you and your family.
    Please note the items listed under Legend in the right sidebar of this page.

  • HT4314 I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    Hi Jamesdwills,
    Welcome to the Support Communities!
    If you are using the same Apple ID on both devices, the Game Center profile should be the same.
    Check out this information from the iPad User Guide.  Try signing out of the Game Center on both devices and then sign back in with the correct Apple ID:
    Using Game Center
    http://support.apple.com/kb/ht4314
    Game Center settings - iPad User Guide
    http://help.apple.com/ipad/7/#/iPad9a13d039
    Game Center settings
    Go to Settings > Game Center, where you can:
    Sign out (tap your Apple ID)
    Allow invites
    Let nearby players find you
    Edit your Game Center profile (tap your nickname)
    Get friend recommendations from Contacts or Facebook
    Specify which notifications you want for Game Center. Go to Settings > Notifications > Game Center. If Game Center doesn’t appear, turn on Notifications.
    Change restrictions for Game Center. Go to Settings > General > Restrictions.
    Cheers,
    - Judy

  • I stopped using iCloud after another family member received all my contacts. Now I want to restart using iCloud. How do I prevent this happening again? We share the same Apple id password and credit card but different usernames.

    I stopped using iCloud after another family member received all my contacts. Now I want to restart using iCloud. How do I prevent this happening again? We share the same Apple id password and credit card but different usernames.

    If two of you shared the same contacts you were logged in with the same Apple ID. In order to avoid this you need to use different Apple IDs, and be using separate Macs or separate user accounts on the same Mac.
    One or other of you should create a new Apple ID at http://appleid.apple.com for which you will need a non-Apple email address which hasn't been associated with another Apple ID.

  • I and my brother have different apple id's but are using the single itunes library on our home PC.When i am syncing my iphone most of the times the apps that were purchased with my brothers apple id is also getting on my iphone.

    i and my brother have different apple id's but are using the single itunes library on our home PC.When i am syncing my iphone most of the times the apps that were purchased with my brothers apple id is also getting on my iphone.
    How do i differentiate the apps that were purchased with my apple id and sync accordingly.As i want only the apps that were purchased in my apple id.
    I am aware of the fact that i can click on the app and check with "getinfo" to see with whose apple id it is brought.but there are hundreds app which i cannot check one by one.
    How do i filter the apps with apple id and sync?

    Connect the device to the computer.
    Open iTunes.
    Select the content desired to sync.
    Sync.

Maybe you are looking for

  • WEEK_OF_MONTH parsing in SimpleDateFormat

    Hello, I am trying to use the WEEK_OF_MONTH (capital W) in SimpleDateFormat. I want to be able to do both parse() and format() of in the format "yyMMWW". I also want to use false lenient in order to have strict control. I have seen that the first wee

  • Error while doing GR for mvt type: 501

    Hai Whenever i do a G.R with out P.O (mvt type 501) i encounter the following error "field selection for mvmt type 501 / acct 895000 differs for vendor goods movement (014)" How to fix this? Thanks

  • Product registration help

    Hello all, I need to find my registration information for some Apple products that I purchased online. Of course, there is no email record of a QuickTime Pro purchase and that's what I need. Does anyone know how to find registration information onlin

  • PostCode - problem with validation

    Hello, I have problem with codes in Netbeans.I Have two code. The first is to mask formatter and i put in on Post int code try MaskFormatter PostCode = new MaskFormatter("##-###"); PostCode.setValidCharacters("0123456789"); RegisterPostCode = new JFo

  • How do I set my camera to save all pictures to my phone and not the memory card?

    Since I've added a 4G memory card my camera has a very long delay after each picture. I noticed if i switch it to save to the phone there is no delay. Is there any way of fixing this or do I have to switch it every time i use the camera? Post relates