Sax Content Handler in VB6 and the "&" symbol

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Javilen
    New Member
    • Sep 2007
    • 20

    Sax Content Handler in VB6 and the "&" symbol

    At my company we use the Sax Content Handler to parse XML data files.

    We are running into a problem where the client is some times sending an & with out the accompanying amp; example. They send <Client Name> AT&T</client Name>
    The Sax crashes between two functions it seems and we can’t seem to find a way to catch the error before it happens to try and avoid it.
    Has anyone come across this and found a way to fix it?

    Thanks
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    you need to replace the & with && before processing.

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      Before Parsing the XML File, first, Open the XML File in a TextEditor ,
      and Replace all "&" with "&amp;", and save the File..
      This, you can do manually, or write a small VB Program...
      Or tell the Client to Send XML File accordingly....

      Regards
      Veena

      Comment

      • Javilen
        New Member
        • Sep 2007
        • 20

        #4
        I was afraid that would be the answer, we can’t edit the files manually, the files arrive once a week and can have upwards of 50K records.

        And writing the app will work, but it increases our overall processing time and we have a very strict turn around when it comes to the client’s files. If there is no way to handle this data properly when it gets this problem then we will have to let the client know it’s bad data and hope they can fix it.

        Thanks for your help

        Comment

        Working...