Invalid Character when exporting to XML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trifectabx
    New Member
    • Aug 2016
    • 1

    Invalid Character when exporting to XML

    Hello,
    I'm a newbie at this.. I tried exporting a table to XML and receiving an error " An Invalid Character was found in text content". I found this VBA function from the net and I've created my function and I created a Module. But how do I run this in Access to search for the invalid characters. My table is called LOG. Here's what I created for the module.

    FUNCTION CLEAN(dirtyStr)
    DIM cleanStr AS String
    dim charValue as intger

    FOR i = 1 TO LEN(dirtyStr)
    let charValue = ASC(MID(dirtySt r,i,1))
    if charValue>=32 and charValue <=126 then
    cleanStr=cleanS tr + MID(dirtyStr,i, 1)
    endif
    NEXT i

    let CLEAN=cleanStr
    END FUNCTION
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Use the function in your query like:
    select clean(fldXL) from tblLOG

    Nic;o)

    Comment

    Working...