How to export strings with "\"

When I export a string with backslashes in it (eg. path name to a file) then when this file is imported at run time then backslashes '\' cause the import to fail. So for now I have to replace all "xxx\yyy" strings in exported file with "xxx\\yyy" and then import
of such MODIFIED file goes OK.
But this is tedious - is there another way to deal with it ?

This is caused by the fact that the ASCII backslash character is the escape code specifier, and when the file is read by the import/export properties tool it is treated as such. If you have any character sequences in a string such as "\t" or "\n" these get interpreted as tabs and newlines within the string.
To avoid this behavior when importing you will need to modify the strings in TestStand before exporting them to include the "\\" escape code set to the file. The caveat to this is once these values are read back from the file they will be interpreted as single backslashes. For instance, if you export "c:\\temp", and then import it back you will get "c:\temp". This is simply the nature of the Import/Export Properties tool.
If you do not like the b
ehavior of this tool in its shipping form, you can rebuild the "limitloader.dll" module to include the functionality that you want. Whenever you click the Tools>>Import/Export Properties menu selection, the MainSequence of \Components\NI\Tools\ImportExport.seq is being executed. This has a single step in it that calls the "DisplayImportExportDialog" function of the limitloader.dll. The source for the limitloader.dll can be found in the \Components\NI\StepTypes\Database directory.
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask

Similar Messages

  • How to export string in CDATA with the jaxb xml writer?

    How to export string in CDATA with the jaxb xml writer?
    It read CDATA no problem but it is lost on write.

    Found it:
    ### THIS WORKS WITH SUN JAXB REFERENCE IMPLEMENTATION. ###
    (Not tested with any other)
    In the xsd, you must create a type for your string-like element.
    Then associate a data type converter class to this new type, which will produce CDATA tags.
    Then you must set a custom characterEscapeHandler to avoid the default xml escaping in order to preserve the previously produced CDATA tag.
    Good luck.
    -----type converter-----
    import javax.xml.bind.DatatypeConverter;
    public class ExpressionConverter {
         * Convert an expression from an XML file into an internal representation. JAXB will
         * probably have already stripped off the CDATA encapsulation. As a result, this method
         * simply invokes the JAXB type conversion for strings but does not take any other action.
         * @param text an XML-compliant expression
         * @return a pure string expression
         public static String parse(String text) {
              String result = DatatypeConverter.parseString(text);
              return result;
         * Convert an expression from its internal representation to an XML-compliant version.
         * This method will simply surround the string in a CDATA block and return the result.
         * @param text a pure string expression
         * @return the expression encapsulated within a CDATA block
         public static String print(String text) {
              StringBuffer sb = new StringBuffer(text.length() + 20); //should add the length of the CDATA tags + 8 EOLs to be safe
              sb.append("<![CDATA[");
              sb.append(wrapLines(text, 80));
              sb.append("]]>");
              return DatatypeConverter.printString(sb.toString());
         * Provides line-wrapping for long text strings. EOL indicators are inserted at
         * word boundaries once a specified line-length has been exceeded.
         * @param text the string to be wrapped
         * @param lineLength the maximum number of characters that should be included in a single line
         * @return the new string with appropriate EOL insertions
         private static String wrapLines(String text, int lineLength) {
              //wrap logic, watchout for quoted strings!!!!
              return text;
    ------in caller----
    Marshaller writer = ......
    writer.setProperty("com.sun.xml.bind.characterEscapeHandler", new NoCharacterEscapeHandler());
    -----escaper-----
    import java.io.IOException;
    import java.io.Writer;
    import com.sun.xml.bind.marshaller.CharacterEscapeHandler;
    public class NoCharacterEscapeHandler implements CharacterEscapeHandler {
         * Escape characters inside the buffer and send the output to the writer.
         * @param buf buffer of characters to be encoded
         * @param start the index position of the first character that should be encoded
         * @param len the number of characters that should be encoded
         * @param isAttValue true, if the buffer represents an XML tag attribute
         * @param out the output stream
         * @throws IOException if the writing process fails
         public void escape(char[] buf, int start, int len, boolean isAttValue, Writer out) throws IOException {
              for (int i = start; i < start + len; i++) {
                   char ch = buf;
                   if (isAttValue) {
                        // isAttValue is set to true when the marshaller is processing
                        // attribute values. Inside attribute values, there are more
                        // things you need to escape, usually.
                        if (ch == '&') {
                             out.write("&");
                        } else if (ch == '>') {
                             out.write(">");
                        } else if (ch == '<') {
                             out.write("<");
                        } else if (ch == '"') {
                             out.write(""");
                        } else if (ch == '\'') {
                             out.write("&apos;");
                        } else if (ch > 0x7F) {
                             // escape everything above ASCII to &#xXXXX;
                             out.write("&#x");
                             out.write(Integer.toHexString(ch));
                             out.write(";");
                        } else {
                             out.write(ch);
                   } else {
                        out.write(ch);
              return;

  • How to display string with XML content in 4.6?

    Hi,
    I`d like to know how to display string with XML content in it for 4.6.
    4.6 has not method parse_string.
    And example like this is not helpful:
      DATA: lo_mxml    TYPE REF TO cl_xml_document.
      CREATE OBJECT lo_mxml.
      CALL METHOD lo_mxml->parse_string
        EXPORTING
          stream = gv_xml_string.
      CALL METHOD lo_mxml->display.
    Thank you.

    Hi,
    May be you can use fm SAP_CONVERT_TO_XML_FORMAT. But it have some issues with memory usage, the program consumed tons of memory during convert.

  • How to export data with column headers in sql server 2008 with bcp command?

    Hi all,
    I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
    am trying to import data with bcp command data has been copied but column names are not came.
    I am using the below query:-
    EXEC master..xp_cmdshell
    'BCP "SELECT  * FROM   [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
    Thanks,
    SAAD.

    Hi All,
    I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
    DECLARE @BCPCMD
    nvarchar(4000)
    DECLARE @BCPCMD1
    nvarchar(4000)
    DECLARE @BCPCMD2
    nvarchar(4000)
    DECLARE @SQLEXPRESS
    varchar(50)
    DECLARE @filepath
    nvarchar(150),@SQLServer
    varchar(50)
    SET @filepath
    = N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
    as varchar(4))
    +RIGHT('00'+CAST(MONTH(GETDATE())
    as varchar(2)),2)
    +RIGHT('00'+CAST(DAY(GETDATE())
    as varchar(2)),2)+'.log" '
    Set @SQLServer
    =(SELECT
    @@SERVERNAME)
    SELECT @BCPCMD1
    = '''BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT '
    SELECT @BCPCMD2
    = '-c -t , -T -S '
    + @SQLServer + 
    SET @BCPCMD
    = @BCPCMD1+ @filepath 
    + @BCPCMD2
    Print @BCPCMD
    -- Print out below
    'BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
    EXEC
    master..xp_cmdshell
    @BCPCMD
      ''BCP' is not recognized as an internal or external command,
    operable program or batch file.
    NULL
    if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
    EXEC
    master..xp_cmdshell
    'BCP "SELECT  * FROM  
    [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
    Thanks, SAAD.

  • How to concatenate string with a numeric control ?

    Hi,
    How to concatenate string with a numeric control ?
    Thankyou.
    Solved!
    Go to Solution.

    Its simpler to just use the Format Into String.
    Attachments:
    Format Into String.png ‏11 KB

  • How to export RTF with paragraph style names?

    Anybody can help me "how to export RTF with paragraph style names?"
    Thank you

    It's not something that's natively done with Indesign.
    However it's possible that it might be able to be scripted.
    Check the scripting forum
    http://forums.adobe.com/community/indesign/indesign_scripting

  • How to write strings with an underline on the TOP-OF-PAGE of ALV

    How to write strings with an underline on the TOP-OF-PAGE of ALV

    if u r using classes and methods it can be done
    but if u r using normal fms and then u have to use HTML_TOP_OF_PAGE but the drawback for this it cannot be printed when the report is printed .

  • How to Search strings with and without quotes

    Hello,
    I need to search a string with quote and without quote the same way
    Ex: Wendy's
    If user enters wendys without ' also need to return all the Wendy's..!
    I appreciate any help...!
    Thanks
    RG

    Hi,
    RG wrote:
    Hello,
    I need to search a string with quote and without quote the same way
    Ex: Wendy's
    If user enters wendys without ' also need to return all the Wendy's..!
    I appreciate any help...!So you want to ignore single-quotes, is that it?
    Here's one way:
    INSTR ( REPLACE (big_string,       '''')
          , REPLACE (substring_sought, '''')
          )  > 0 
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • How to export datbase with exp command

    Hi guys,
    How to export oracle database using exp command without including tables space names.
    I tried with this
    ./exp username/password file=db-export.dmp
    ./imp username/password file=db-export.dmp full=y ignore=y
    But when I try to import database with separate login(username/password) its giving following error for some tables,
    ORA-00959: tablespace 'MANUJA' does not exist
    MANUJA is my username of first database
    any help ?
    Thanks
    Best Regards,
    Manuja

    Option 1:
    ./imp username/password file=db-export.dmp full=y
    If still error then :
    Option 2:
    pre-create your table then import with ignore=y option.
    If still error then :
    make sure userB just have one default tablespace (BC) and quota only on BC. So if you have unlimited quota for userB on all tablespaces, then objects will go to original tablespace and not the tablespace you want to put in(to default tablespace).
    Revoke any unlimited tablespace privs from userB and just have one default tablespace.
    REVOKE UNLIMITED TABLESPACE FROM USERB;
    imp system/manager fromUser=userA toUser=userA file=myexport.dmp log=myexport.log
    Source: OrionNet @ remap tablespace using imp
    Regards
    Girish Sharma

  • How to export quicktime with timecode burn?

    I am scoring a film (in Pro Tools HD) and the editor isn't quite sure how to export the film to a quicktime movie with timecode burned in (i believe that's the term for timecode being visible on the preview...?). I don't know what version of FCP he's on but I was hoping someone could give me some generalized instructions I could give him.
    Also, if I have to compress the video to slipstream the processing/reading in pro tools, will I retain proper timecode? thanks!

    He would have to change the Timecode offset value under the Filters tab in the Browser.
    Find a scene that starts on a hard cut, say 1 minute or so into the movie. Note the timecode.
    Your guy then fiddles around with the beginning, making it 6 seconds and 8 frames shorter.
    Go back to the reference cut and you will see that its TC has changed by that much.
    Adjust the Offset parameter to match. This has to be done by entering the number of frames. You can use positive and negative values as required, which will also cover for the changed scenes turning out longer than they were originally.

  • How to put String with html tags as it is into xml

    I am using apache dom API to create xml from java.
    I have a string with html tags in it .when I add the string to xml, its replacing all the "<"; with &lt and ">" with > I would like the html tags to look as it is instead of the > and & lt;. How can I acheive that
    this is the code snippet of what I am doing
    In java class
    String titleString = "<font color=red>This Is an Example of a Red Subject</font>"
    Document doc = new DocumentImpl();
    Element root = doc.createElement("bulletin");
    Element item = doc.createElement("title");
    item.appendChild(doc.createTextNode(titleString));
    In Xml it looks like below
    <title><font color=red>This Is an Example of a Red Subject</font></title>
    but I would like to have the xml like below
    <title><font color="red">This Is an Example of a Red Subject</font></title>
    Can you please suggest me whats the best way to acheive this.
    I appreciate all your help
    Thank you
    Suma

    One problem is that you don't understand escaping. If you re-read what you posted you'll see that what you say you get, and what you say you want, are identical. That's because you didn't escape one of the two properly. So your first step should be to find the section about escaping in Chapter 1 of your XML book and read it carefully. Figure out what you should have done here (yes, the same rules apply).
    However, to attempt to answer what I think your question is: if you have a String which contains markup, and you want to convert that String to XML elements, then you have to feed the String into an XML parser.

  • How to export images with meta data from iPhoto?

    Hi
    I have about 4000 family photos which have been scanned and imported to iPhoto. They are all dated the same day, naturally. I'm now in the process of adding metadata to every photo: location, faces, time and year, file name and description.
    Once I have gone through every photo, I will put them into albums based on events and the meta data above.
    Eventually, I will want to share all these photos with people who should like to see them (and who are not tech savvy...) I'm looking for the best approach to do to this.
    1. Will all the metadata that I have added remain in the photos when I export them?
    2. What exactly is the best approach to export these 4000 photos?
              - As I have gone through all the hard work of sorting the photos in albums, is it possible to export these photos in the albums that they already in?
    I hope to hear from someone out there. Thanks a lot
    Best wishes

    You need to have an application like  EXIF Viewer for Mac OS X  to check the files once you've exported them with the various checkboxes checked:
    Happy Holidays

  • How to export file with original filename number suffix, but with more digits

    Is there a way to keep the original filename number suffix, but change the formatting of the number, adding leading zeros for instance?
    When I import photos from my camera I like to rename them, and give them sequential numbers, e.g. "2015-01 Hamburg 1.cr2", "2015-01 Hamburg 2.cr2", "2015-01 Hamburg 10.cr2", .. "2015-01 Hamburg 134.cr2", and so on.
    Normally when I export photos I like to keep the file names exacly as I imported them (except the extension) e.g. 2015-01 Hamburg 1.jpg, "2015-01 Hamburg 2.jpg", .. "2015-01 Hamburg 10.jpg", .. "2015-01 Hamburg 134.jpg".
    But sometimes I would like to export them with leading zeros, typically when adding photos to a web site or blog where there are sort mechanisms that only support simple sort algorithms based on file names, meaning the sort order of my photos with their original file names would become "2015-01 Hamburg 1.jpg, "2015-01 Hamburg 10.jpg", .. "2015-01 Hamburg 134.jpg", "2015-01 Hamburg 2.jpg".
    So I would like the file names to be "2015-01 Hamburg 001.jpg", "2015-01 Hamburg 002.jpg", "2015-01 Hamburg 010.jpg", "2015-01 Hamburg 134.jpg".
    By keeping the original file number suffix I can easily go back to the original file whenever I need to, and the sort order would work even with simple sorting.
    The export Filename Template Editor gives quite advanced support for numbering files when exporting, see attached screenshot. There's support for exporting files with custom file names, and adding sequence, total and image number with padding (up to 9999/####). But those add new numbers, they do not consider the original filename number suffix. If I use the "Image # (001)" for instance, my example above would export as "2015-01 Hamburg 001.jpg", "2015-01 Hamburg 002.jpg", "2015-01 Hamburg 003.jpg", "2015-01 Hamburg 004.jpg", if those were the four photos I wanted to export, making it hard for me to trace them back to the original photo.
    I have found no way of adding such padding on the original file number.
    Does anyone know if this is possible or have suggestions for a workaround?
    It shouldn't be too hard for Adobe to support this I'd imagine.
    export pattern rename files  file_number filename_template_editor

    I do not know if you can do what you explained above, but there is a workaround to this (and a way to avoid having to do it in the future):
    In the Library module, make sure your images are sorted by Capture Date (this will put them in the right order, even with suffixes like 1, 13, etc.)
    Select all images, and then Rename them, using a Custom text followed by a Sequence number. The Custom text in this case should be the original name (such as, 2015-01 Hamburg, as in your example). Make sure the Sequence number is formatted with enough zeroes to include all the numbers in your images.
    In the future, when you rename images during Import, make sure you select the Sequence number format that will include all the needed zeroes, so you don't have to go through this again.

  • How to extract string with delimiter

    Hello all,
    I'm using Oracle 10g and want to extract string with a delimiter.
    For example, i have aaaa;;bbbb;cccc;dddd;eeee;ffff and i want to extract this string into separates strings 'aaaa', ' ', 'bbbb', 'cccc', 'dddd', 'eeee', 'ffff'.
    Thanks a lots for yours help.
    MK.

    I prefer the regular expression method myself...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'aaaa;;bbbb;cccc;dddd;eeee;ffff' as txt from dual)
      2  -- end of sample data
      3  select REGEXP_SUBSTR (txt, '[^;]+', 1, level)
      4  from t
      5* connect by level <= (select length(regexp_replace(txt,'[^;]*'))+1 from t)
    SQL> /
    REGEXP_SUBSTR(TXT,'[^;]+',1,LE
    aaaa
    bbbb
    cccc
    dddd
    eeee
    ffff
    7 rows selected.
    SQL>

  • How to export presentation with a song/audio

    Hi. My presentation is completely automatic. No manual clicks required. All slides automatically flow with transitions.
    I added music (an MP3 song) to these slides. In Keynote, it plays fine. The song plays when the slides are moving.
    But when I export it as a MOV file to Quicktime, it creates TWO separate files:
    1. Myfile.mov
    2. Myfile-soundtrack.mov
    Just playing Myfile.mov does not help, it does not have sound. What nonsense is this? Is this Apple's famous UI design?
    Anyway, how do I merge these files? Some googling suggested I use GarageBand. So I paid 19 bucks for this software, but even Sending to GarageBand does nothing, it just creates a .MOV file that still does not have sound.
    Any ideas or pointers?
    I have Quicktime Player on my machine (although like any sane person, use VLC for any video playback) and also have the iWork 09 and GarageBand latest. My OS is Mountain Lion latest..
    Thanks.

    How do i do it? i am trying to export a QT file for a live broadcast to lay on top of my main video.< </div>
    Live? Cannot be done. There is no CPU-based codec that will decode and process alpha in realtime. You must use someone's proprietary, hardware-based codec.
    What i am trying to do is put in a file from livetype and another one from motion and export them as a transparent background quicktime file to i can use it atop my livestreaming video. < </div>
    "Livestreaming" is not a term that is in my dictionary. Did you make it up or is a proprietary format for a special Web application?
    Doesn't really matter, you cannot do it live with a stock Macintosh.
    You can recompress and reprocess your footage files and attempt to use video DJ appliances and software or you can get a conventional video switcher.
    FCP is an offline editing system, not a live production environment.
    If we still haven't answered your questions, how about you start a new thread with clearly stated goals.
    bogiesan

Maybe you are looking for

  • Internet connection keeps dropping at night

    I'm having a bit of a weird problem with my internet connection. I connect via an ethernet cable and the connection keeps dropping. It generally starts after 7pm and seems to be every 40 minutes. I have changed the microfilters and ethernet cable but

  • SharePoint 2010 Manage content and structure copy operation issue

    Hi, I am trying to copy a subsite from location A to B in the same site collection using the copy operation of Manage content and structure. Site is getting copied but default.aspx page is not getting copied to the destination. I tried copying the de

  • WrapPanel not found even after adding it from Blend

    Everytime I run I get a parse error that tells me WrapPanel is not found in the assemblies, even though it builds fine. I added it from blend and made sure all of the references were there. What step could I be missing?     xmlns:toolkit="http://sche

  • Sunray Server Capacity Planning

    I've searched high and low on the net to see how to spec out a server for a 50-desktop environment. Each desktop will use the uttsc connector.. However on my 2 systems I've tried, the Load average is through the roof. (5.2 install/kiosk users) Has an

  • Legend text turns black when converting a .ppt to .pdf

    I have a picture of an Excel graph pasted into Powerpoint as an Enhance Metafile.  When I convert the .ppt to .pdf, the legend text in the graph turns into a black filled box. Can you tell me how to avoid this? Thanks!