6 Replies Latest reply on Nov 9, 2014 9:14 AM by philmodjunk

    SAXParseException error



      SAXParseException error


      I was using an export files script along with an xml stylesheet for the last couple of years without any problems. But today I got this error. I haven't changed anything in my set up. So why all of a sudden am I getting this. And more importantly how can I fix it?

      SAXParseException: invalid character 0x14 (Occurred in entity '/private/var/folders/0q/pf12q4653vx8w6hhccwtpvzh0000gn/T/FMTEMPFM530_10.xml', at line 2, column 654201.)

        • 1. Re: SAXParseException error

          Check for any unusual characters in the data you are exporting.

          For More Information see:     SAXParseException on exporting XML with XSLT specified if the field contains an invalid character.

          This is one of many acknowledged bugs that can be found in the Known Bug List thread here in the Report an Issue section of the forum.

          It can also be downloaded as a database file from:    https://www.dropbox.com/s/jt09b82i0xijbu3/FMP%20Bugs.zip

          • 2. Re: SAXParseException error

            Here's a procedure that may work for you. Basically what I'm doing is creating character 0x14 that was in your error message. This way you can copy it and then paste it into the Find/Replace. This is different than the normal find mode you're used to. this is more like Find in Word or Excel.

            1. Create a new FM DB file and add a calc field with the following formula.  Char ( 14 )
            3. Create 1 record in this DB
            5. Go to the field you created and select all. Note, you will not be able to see the character..
            7. Copy what you selected.
            9. Go to your database and find the records modified since the last successful export
            11. Go Edit > Find/Replace and paste the invisible character into the field "Find what:"
            13. Click "Find Next"  This may take awhile if you have a lot of records. Basically this goes from record to record until it finds the pasted character.
            15. If this is successful delete the contents of the field it stops at and retype it manually. Don't copy and paste.
            17. Repeat 7 & 8 until no more instances of the character are found.
            • 3. Re: SAXParseException error

              Thanks. I'll try those methods. It seems fairly straight forward. 

              • 4. Re: SAXParseException error

                Once you figure out which fields have the problem characters, you can set up an auto-enter calculation on that field to automatically remove them in the future. (Or use Replace Field contents to "clean up" batches of newly imported data...)

                • 5. Re: SAXParseException error

                  I wan't able to isolate the record or the filed with the faulty character using your steps Brian. I made a database and made the invisible character that you mentioned. It doesn't seem to even take up a space. I searched for it using find/replace in the most recent records and then I went through all of my records in a number of different tables. 

                  So I tried to find if I could export by limiting the export to a small amount of records and then made larger and larger exports. I was able to isolate the faulty records down to a smaller and smaller range until I found the record with the 0x14. Then I was able to find the field with 0x14 through a similar process of elimination. What more would I be doing on a Saturday night?!

                  Any way I followed your advice and retyped the faulty information and it all exports quite nicely now. So thanks very much for your advice. It was bugging me (excuse the pun) all day.

                  I'm just wondering though if I want to prevent this in the future from happening and I want to follow Phil's advice in using an auto-enter calculation how can I do this if the character won't be found in the first place?

                  • 6. Re: SAXParseException error

                    The Substitute function should work to eliminate specific unwanted characters. The Filter function, on the other hand can be used to keep all wanted characters without explicitly identifying all characters you want to exclude. That can be a better option, but does require setting up an extensive list of characters to keep in both upper and lower case.

                    Substitute ( self ; "a" ; "" ), would remove the lower case "a' from the field. and you can use the Char function in place of "a" if you know the character code.

                    Filter ( self ; "abcdefghijklmnopqrstuvwxyz" )

                    Would exclude all characters except the lower case letters "a" through "z".