XSLT formatting a string
Hi there.
I'm new to XML/XSLT etc. I am connecting to an rss feed on
another site, all is working well but I just want to show the first
50 characters of the description (tag?). I am as asp developer and
would have used <%=Left(mystring,50)%> - is there a similar
xslt function available, I've searched everywhere but to no avail.
Thanks for any help.
Tony Mead
Tony,
Try this:
<ParentTag>
<xsl:value-of select='substring
(/Description, 1, 50)'/>
</ParentTag>
Substitute whatever your parent tag is, obviously.
I always start here before posting questions about markup:
http://www.w3schools.com/
HTH
Steve
"tony_mead" <[email protected]> wrote in
message
news:g8md39$kvr$[email protected]..
> Hi there.
>
> I'm new to XML/XSLT etc. I am connecting to an rss feed
on another site,
> all
> is working well but I just want to show the first 50
characters of the
> description (tag?). I am as asp developer and would have
used
> <%=Left(mystring,50)%> - is there a similar xslt
function available, I've
> searched everywhere but to no avail.
>
> Thanks for any help.
>
> Tony Mead
>
Similar Messages
-
I'm attaching a file that may help. Just remember this is my FIRST attempt at using NI/FeildPoint so things that would be obvious to the normal users more than likely would slide right by me. So I'll try and explain what the text contains as to make my problem more clear. I'm using a FP-1000, FP-AI-100, and a FP-TB-10. i'm creating a application where I'm using the 8 channels from the FP-AI-100 to monitor a control system ,that we manufacture. The control system is in an environmental chamber. I use the FP-TB-10 to monitor the temperature while in the chamber. The control system is ran for 4 hours under varing enviromental conditions while I monitor vital system voltages with the FP-AI-100. Now the application that i'm building starts with the obvious FP CREATE.VI and so forth I have no problem communicating with the FP's, but the information that I'm monitioring needs to be placed into a file with Headers describing the information below it. Now I use a "WHILE LOOP.VI" to monitor the FP-AI-100 & FP-TB-10 for the 4 hour period. but before that I create and open a file where I use a "CONCATENATE STRINGS.VI" to enter the headers I need. I do this by CONSTANTS, CONTROLS, TABs, AND CARRIAGE RETURN being entered into the "CONCATENATE STRINGS.VI" in the order I want them to appear. I use ROW 1 to enter (OPERATOR:with a CONSTANT) an a (CONTROL so the operator may enter his name and be recorded into the file) using a TAB to seperate Columns and a CARRIAGE RETURNto drop down to ROW 2 for the next headers. I use header names and TABs to seperate the columns. This part works great. I end up with ROW 1 having the operator information then ROW 2 having the headers for all the channels I'm using to monitor the control system with in their own column. The trouble happens when I write to this file during the "WHILE LOOP". The information recorded for DATE:, TIME:, and Channel 0 of the FP-AI-100 end up right under their corresponding header on ROW 3, but the rest of the data ends up on ROW 4 in column 3 and goes down many rows with some of the data not being stored at all. It varies on how many rows are used starting at ROW 4 but hey always stay in column 3. I use the "FP READ.VI" outputing to a "ARRAY TO SPREADSHEET STRING.VI" outputing to a "CONCATENATE STRINGS.VI" for each channel within the "WHILE LOOP" then into the "WRITE.VI". I use the "CONCATENATE STRINGS.VI" to place my data OR atleast I thought you could do that some how I'm not quit doing something write either there is a sampling/timing issue or writing to file issue where things are being confused in the "WHILE LOOP" if someone know a better route to perform what I'm tring here I would be interested. Its not like I'm not giving it the old colledge try here but without proper training and the vagness of the manuals it's difficult to understand what every connection actually does.I'm tring though for everyone who happens to fill pity for me
Thanks for your help
John Morris
Glendinning Marine Product, Inc.
Attachments:
ALLchannels 273 KB> I appreciate your effort to help me, but there is still a slight cloud
> in front of my eyes here.(I must mention that I'm using Labview 5.1
Oh, to bad. I'm using LV 6,02 and tried to save the application as LV5.1,
but it didn't work.
> Lets start with the easy one which is the SECOND main thing you
> wanted to mention. In my application I used individual Create Tag.vi's
> "so your saying that I can use just one Create Tag.vi and one Read.vi
> and what ever I use to display the values will automatically to show
> the individual channels" in other words if I use a "Indicator(DBL)"
> comming out of the Read.vi what ever I use in the "PANEL" layout will
> expand to show all 8 channel if I was using a FP-AI-100? Cool...
Allmost right. The 8 channels come out as 1D-array, ch0...ch7.
> #1--How do I change the delimiter (TAB) to a delimiter (comma) in a
> Array to Spreadsheet String.vi?
> ...cut
I don't use this Spreadsheet VI, because files coming out there allways
start this time consuming EXCEL wizzard. Because of this, I programmed my
own CSV-conversion vi. Maybe you could just use a common texteditor, like
wordpad and put the csv-examples from my last reply down to a text file
and rename it to *.csv. Texteditors terminate lines with "\r\n" by
default, so this is a very quick way for testing.
> FP_Analog_Logging example to record all eight channels it uses a Array
I didn't find the vi you metione above, but there is another good one:
Look at examples\FieldPoint\DataLogging\FP Logger.vi.
In a little case structure, at "false", there is a function called "Format
into string".
Pop up on the format string and adjust >>'\' Codes Display<<.
Then you change the format string into: %.;%-f%s
A Tab string is connected to the lower input of this function. Replace
this one with a comma.
That should do.
>
> #2--If using just one Create Tag.vi and one Read.vi and I have the
> Item Name listed as ALL I take it that the information comming out of
> the Read.vi is data for each channel in a String format starting with
> channel 0 and ending with channel 7 for the FP-AI-100.
Yes, just as explained above. If you put a indicator at the output to
display the values, you can expand the display to show all 8 channels, but
you can't name induvidual cells. In a array, all cells have identical
named labels. If you want to name the individually, you have to attach the
array to cluster function and put the indicator after this one. Enable
labe display and name the output values individually.
> #3--Now I use the following to "Format String" in the Array to
> Spreadsheet string.vi (%.4f)but I don't see anyway of changing the
> delimiter from (TAB) to (COMA)
Explained above.
> #4 you stated text strings need a "as prefix and sufix" and each
> string is seperated by a coma, a period is used as decimal number
> separator and lines have to be terminated by my question is
> WHERE IS THIS ACCOMPLISHED? WHAT VI OR WHAT CONNECTOR PIN?
Well, modifying strings are done with string functions.
Above, as I explained how the sample FP Logger.vi can be modified to do
the job for numbers. The pre- and suffixing with ", you only need for
strings, which EXCEL should interpret a string and as nothing else as a
string, even if there's a number inside. You usually need this only for
headers. So its easyest, if you just write your string into a string
constant or control and concatenate it to the previous csv-file contents.
Oh, I just see by looking at the above mentioned example... Inside the
case structure, but in the "true" case, there are error messages
concatenated to the logfile. At this point it is importent, to use " for
integrating the message into the CSV file, because a error message usually
looks like this: >> ERROR 2345 in vi yxz <<
Here you have text and number strings mixed in one line. EXCEL does not
know, if it should interpret the number inside the error line as separate
number, separating the line into three colums i.e. string before number,
number and string after number. So tell EXCEL by putting a " before and
after the line each.
For this, expand the Format To String function by one input, move down all
connections, to be able to insert a string constant with a " to the first
argument connector. Change the contents of the string constant at the
bottom argument from tab to ", (quotation mark AND comma)
> #5 You gave me an example of what a 3 column header could look like:
> "col0","col1","col2"\r\n Now is this something that you enter
> somewhere cause I know that \r is carriage return and \n is newline so
> I take it that the above is entered somewhere maybe in the Write.vi to
> the connector called Header (F)? See this is what confuses me because
> NI manuals have no examples of certain connectors types being used or
> any reference as to how they manipluate data with there varing type
> inputs. Or maybe I'm just missing them.
The example I mentioned above help here to.
Look at the Write File function. This function receves data from a
function named concatenate strings. Expand this function to have one more
spare input at the bottom. Create a string constant. Switch the constant
display to "\" mode. Enter "col0","col1","col2"\r\n into the constant.
Connect the constant to the spare input.
Doing this, every dataline in the csv file is followed by
"col0","col1","col2"\r\n .
I wish you a nice weekend,
Rainer Ehrt -
Formatting a string with time stamp and double precision numbers
%s\t%f\r%f
This is a format string that I have in old code that I've decided to change. Problem is I cannot make sense of the string codes in my own old code! Let me explain what I want, and hopefully someone can explain how to do it.
I am using the format into string subvi to merge a time stamp (formatted as %m%d%Y%H%M%S%5u) and two different double precision numbers. This string is then wired into the Write Characters to File subvi so that I can record data as a .txt file, and open it in either Matlab or Excel. There is a minor problem with the string format above because in excel the first time stamp entry is blank, and the first loop only gives the two double precision numbers withouth the time stamp - the time stamp appears in the next loop (probably a looping issue and not due to the string format, but if you see differently please let me know). Now what I want to do is 1. potentially fix that problem and 2. add some more doubles.
1. Is there a string format issue that is evident that I am not seeing that causes the time stamp to be formatted into the string after a carriage return? Or should I be looking at looping issues?
2. How do I add another one - three floating point numbers (double precision)? Are the \'s marking different numbers in this string constant? Or is it the %? I can't find any information about the \'s, but I see that % begins the format specifier.
Ideally, I want these data in the following columns: Date, Time(absolute), FP, FP, FP, carriage return for the next loop (FP is floating point double precision number).
Thanks,
BradHi JonN,
Here there is no need of string concordinate function (in your code), the same result you can find if you connect the output of the format string to shift register, and shift register in data to initialize string connector in format into string function.
<<KUDOS ARE WELCOME>>
ELECTRO SAM
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
- John 3:16 -
Formatting a string in message mapping
Hi all,
This is about Formatting a String. I have seen a NumberFormat( arithmetic ) for numbers. Is there any function for String Format? For my application, I need to append empty string at right side of the input string. This string may be varying its length. If standard function not exits then please help me with USDHi,
Do u mean to say that the target field is of fixed length and source field may b of varying length.
Hence depending on the strlen() of the source field you need to keep append empty strings to reach the length of the target field?
Arvind -
How to convert xslt file into string
i'm writting a java program to use xslt to transform the xml file. i'm encountering the problem when i try to convert the xslt file into string. i've defined my utility class called 'XmlUtil' to carry out the operation of transform xml file through xslt. but in my main java program i need to convert both xml and xslt file into a string in order to input them in my function argument. my function argument is as follows:
String htmlString = XmlUtil.applyXsltString(xmlContent, xsltString);
i've already converted xmlcontent into string by using:
xmlContent = xmlContentBuffer.toString();
but i don't know how to convert 'xsltString' now ? i've searched the google for an hour but i cannot find the solution. anyone can help ?
detail of my souce code is as follow:
import java.io.*;
import java.net.*;
import java.lang.*;
import java.io.StringReader;
import java.lang.reflect.Array;
import java.util.Properties;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamSource;
import org.apache.xml.serializer.OutputPropertiesFactory;
import org.apache.xml.serializer.Serializer;
import org.apache.xml.serializer.SerializerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
import XmlUtil;
public class FileDownload {
public static void download(String address, String localFileName){
OutputStream out = null;
URLConnection conn = null;
InputStream in = null;
StringBuffer xmlContentBuffer = new StringBuffer();
String temp = new String();
String xmlContent;
try {
URL url = new URL(address);
out = new BufferedOutputStream(
new FileOutputStream(localFileName));
conn = url.openConnection();
in = conn.getInputStream();
byte[] buffer = new byte[1024];
int numRead;
long numWritten = 0;
System.out.println (in.toString ());
while ((numRead = in.read(buffer)) != -1) {
out.write(buffer, 0, numRead);
numWritten += numRead;
temp = new String(buffer);
xmlContentBuffer.append(temp);
System.out.println(localFileName + "\t" + numWritten);
xmlContent = xmlContentBuffer.toString();
String htmlString = XmlUtil.applyXsltString(xmlContent, xsltString);
} catch (Exception exception) {
exception.printStackTrace();
} finally {
try {
if (in != null) {
in.close();
if (out != null) {
out.close();
} catch (IOException ioe) {
public static void download(String address) {
int lastSlashIndex = address.lastIndexOf('/');
if (lastSlashIndex >= 0 &&
lastSlashIndex < address.length() - 1) {
download(address, address.substring(lastSlashIndex + 1));
} else {
System.err.println("Could not figure out local file name for " + address);
public static void main(String[] args) {
for (int i = 0; i < args.length; i++) {
download(args);
}I don't understand why you need load the XML and XLS files into a String. A Transformer can be constructed from a Source and there is a StreamSouce which can be constructed from an InputStream. The transform() method can take a Source as input and can produce a Result. There is no need to go near a String representation of either the input.
-
Hi,
Exchange 2010 MP fails to run Troubleshoot-DatabaseSpace.ps1. Results in a Warning with "Error formatting a string: Format string is not supported". The EventNumber is 402. The Microsoft article it points to is useless at http://technet.microsoft.com/en-us/library/749e0eac-ebb2-41e3-8fa2-4a03a1bd3571.aspx
Run ".\Troubleshoot-DatabaseSpace.ps1 -Server MailboxServer.domain.com -MonitoringContext" and works fine.
Any help appreciated.
thanksHi,
Before the newer MP release, we can disable these 4 monitor via override and this should not run the Troubleshoot-DatabaseSpace.ps1 :
KHI: Failed to execute Troubleshoot-DatabaseSpace.ps1.
KHI: The database copy is low on database volume space and continues to grow. The volume is under 25% free
KHI: The database copy is low on database volume space and continues to grow. The volume has reached error levels under 16% free.
KHI: The database copy is low on database volume space and continues to grow. The volume has reached critical levels 8% free.
Alex Zhao
TechNet Community Support -
Hello All
Is there a way I can use format specifiers with variables?
OK so I need to format a string to be a certain length equal to the longest string I am using. So what I would like to use is something like:
%xs where x is the number of the length of the longest string I have. So if I have a string with 9 characters and one with 4 characters then I need 5 spaces on the left side of the 4 character string to push it to the right. (5 = 9 - 4). But the 9 might become 12 one time, or 3 the other, so it is a variable length.
I tried to use concatenation to build the formatter expression, but the printf line did not understand it.
Any help would be greatly appreciated.Well I can think of two solutions...
If you want to not modify the Strings and just show the outcomes of adding the spaced you can simply print the appropriate amount of spaces before the string...
public class Sandbox {
public static void main(String[] arg) {
String s1 = new String("Hello World");
String s2 = new String("Hello");
System.out.println(s1);
for (int x=0; x<(s1.length() - s2.length()); x++) {
System.out.print(" ");
System.out.print(s2);
OUTCOME:
Hello World
HelloBut if you want to actually make the string that certain amount of spaces longer you can use the following...
import java.lang.StringBuilder;
public class Sandbox2 {
public static void main(String[] args) {
String s1 = new String("Hello World");
String s2 = new String("Hello");
StringBuilder sb = new StringBuilder(s2);
for (int x=0; x<(s1.length() - s2.length()); x++) {
sb.insert(0, " ");
System.out.println(s1+"\n"+sb);
OUTCOME:
Hello World
Hello -
Method to Format a string column containing HTML tags as simple string.
Hello,
I am working with formating a string column which holds Html tags.
I want to remove these tags from the actual data which has to be shown on the BI Publisher report.
Can you suggest how can we format this in the DataSet designer of BI publisher so that my data is recognised on the Layout designer.
I have been trying to create an expression using the "Add Element by Expression" option to format this html tag data as normal string without the tags.
Can you suggest if this is the correct method to do this.
I found this below code being used in an existing DateSet but i am not able to recreate a similar formating on this kind of data column.
<![CDATA' || '['|| TO_CLOB(SUCCESS_CRITERIA) || ']' || ']>
Kindly suggest if you have any idea on the above mentioned issue.
Thanks,
ShwetaAnd read this:
Navigate yourself around pitfalls related to the Runtime.exec() method
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html -
Dear All
how to format paragraph string to show content left, Right or middle of pdf document using iTextsharp in visual basic and absolute position on the document.
ThanksHere is one more example that i have modified the GetCell function so that you can use it for adding all the cells to the document. It takes several arguments to specify everything you need to create each cell. It now lets
you specify the Text, the Text Alignment, the Text Font and color, weather the cell shows the Border, the BackColor of the cell, and the Padding values for the Left, Right, Top, and Bottom.
If you study the code you should be able to figure out how it works. From here you can figure out the rest of what you need to do and how to use the
GetCell function.
With one quick google search for "iTextSharp Documentation" the first link to pop up was this link.
iTextSharp Documentation
Imports System.IO
Imports Its = iTextSharp.text
Public Class Form1
Private dt As New DataTable
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
dt.Dispose()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dt.Columns.Add("Name")
dt.Columns.Add("Age")
dt.Columns.Add("Birth Date")
dt.Rows.Add(New Object() {"Johnny", "23", Now.AddYears(-23).ToString})
dt.Rows.Add(New Object() {"Frank", "41", Now.AddYears(-41).ToString})
dt.Rows.Add(New Object() {"Rex", "33", Now.AddYears(-33).ToString})
dt.Rows.Add(New Object() {"Kim", "26", Now.AddYears(-26).ToString})
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyPdfFilePath As String = "C:\TestFolder\MyPdf.pdf"
Dim pSize As New Its.Rectangle(Its.PageSize.A4)
Dim PdfDoc As Its.Document = New Its.Document(pSize, 10, 10, 10, 10)
Dim PdfImage As New Its.Jpeg(New Uri("C:\TestFolder\MyLogo.jpg"))
PdfImage.Alignment = Its.Jpeg.ALIGN_CENTER
Dim pTable As New Its.pdf.PdfPTable(1)
pTable.AddCell(getCell("Name : " & TextBox1.Text, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 15, Its.BaseColor.BLACK), False, Its.BaseColor.WHITE, 10, 0, 0, 0))
pTable.AddCell(getCell("Policy : " & TextBox2.Text, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 20, Its.BaseColor.RED), False, Its.BaseColor.WHITE, 10, 20, 0, 0))
Dim cTable As New Its.pdf.PdfPTable(dt.Columns.Count)
For Each col As DataColumn In dt.Columns
cTable.AddCell(getCell(col.ColumnName, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 12, Its.BaseColor.WHITE), True, Its.BaseColor.BLUE, 3, 5, 0, 0))
Next
Dim tblfont As Its.Font = Its.FontFactory.GetFont("Arial", 10, Its.BaseColor.BLACK)
For Each row As DataRow In dt.Rows
cTable.AddCell(getCell(row.Field(Of String)("Name"), Its.pdf.PdfPCell.ALIGN_LEFT, tblfont, True, Its.BaseColor.WHITE, 3, 4, 3, 0))
cTable.AddCell(getCell(row.Field(Of String)("Age"), Its.pdf.PdfPCell.ALIGN_CENTER, tblfont, True, Its.BaseColor.WHITE, 3, 4, 0, 0))
cTable.AddCell(getCell(row.Field(Of String)("Birth Date"), Its.pdf.PdfPCell.ALIGN_RIGHT, tblfont, True, Its.BaseColor.WHITE, 3, 4, 0, 3))
Next
Using fs As New FileStream(MyPdfFilePath, FileMode.Create, FileAccess.Write, FileShare.None)
Using pdfWrite As Its.pdf.PdfWriter = Its.pdf.PdfWriter.GetInstance(PdfDoc, fs)
PdfDoc.Open()
PdfDoc.Add(PdfImage)
PdfDoc.Add(pTable)
PdfDoc.Add(cTable)
PdfDoc.Close()
End Using
End Using
PdfDoc.Dispose()
End Sub
''' <summary>Creates a new cell for the table.</summary>
''' <param name="text">The text string for the cell.</param>
''' <param name="alignment">Alighnment for the text string.</param>
''' <param name="textfont">The font used for the text string.</param>
''' <param name="border">True to show the cell border. False to hide the cell border.</param>
''' <param name="backcolor">The background color of the cell.</param>
''' <param name="padtop">The amount of padding on the top of the text string.</param>
''' <param name="padbottom">The amount of padding on the bottom of the text string.</param>
''' <param name="padleft">The amount of padding on the left of the text string.</param>
''' <param name="padright">The amount of padding on the right of the text string.</param>
Public Function getCell(ByVal text As String, ByVal alignment As Integer, ByVal textfont As Its.Font, ByVal border As Boolean, ByVal backcolor As Its.BaseColor, ByVal padtop As Single, ByVal padbottom As Single, ByVal padleft As Single, ByVal padright As Single) As Its.pdf.PdfPCell
Dim cell As New Its.pdf.PdfPCell(New Its.Phrase(text, textfont))
cell.BackgroundColor = backcolor
cell.PaddingLeft = padleft
cell.PaddingRight = padright
cell.PaddingTop = padtop
cell.PaddingBottom = padbottom
cell.HorizontalAlignment = alignment
If Not border Then cell.Border = Its.pdf.PdfPCell.NO_BORDER
Return cell
End Function
End Class
If you say it can`t be done then i`ll try it -
Is the XSLT format-number function supported by XMLType.transform()
I am trying to use the XSLT format-number function in a stylesheet via myXMLType.transform(myXSL) without any luck. For example, <xsl:value-of select="format-number($myNum,'#,###.00')/>. This works ok under the java based XSLT engine.
Is format-number supported by XML DB?
I am running 9.2.0.5.
Cheers
AnthonyI have upgraded to 10g and found that this now works.
Cheers
Anthony -
Format into string 16 bit signed integer
Is there any format specifier string for "Format into string", whereas the result is an I16 string?
My problem is when I use "%d" and the input string is 65535, the result string should be "-1".
Solved!
Go to Solution.Are you trying to get an integer out of an ASCII string (Scan from String) or turn an integer into a string (Format into String). You title and question seem to contradict each other.
Assuming you are trying to scan from string, it looks like you need to scan into a U16 and then use a conversion bullet to turn it into an I16.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Scan I16.png 11 KB -
I am reading a large txt file that contains sigle quotes and double quotes... I want to format the string and send it to a blob cell in mysql. I need to add an escaoe character before single quotes and double quotes. Any suggestions?
john joe wrote:
I am reading a large txt file that contains sigle quotes and double quotes... I want to format the string and send it to a blob cell in mysql. I need to add an escaoe character before single quotes and double quotes. Any suggestions?
Yes! Use "Search and Replace String" with "replace all?" = True. Replace "'" with "\'" and replace """ with "\"".
Cheers.
Message Edited by tbd on 02-12-2007 11:06 PM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare) -
Hello all,
I would like to format a string with "a white space" between each
string member. i am at odds as for the format, for the "format
string" in the Format Into String function. let me rephrase that...
the format which needs to be used to format the "FORMAT STRING" in the
Format Into String function.
i looked at the help, but it seemed very nebulous to me. all i need is
to have "a white space" or a "carriage return" between the string
members and store it to a file.
thank you,
cheers,
-U> I would like to format a string with "a white space" between each
> string member. i am at odds as for the format, for the "format
> string" in the Format Into String function. let me rephrase that...
> the format which needs to be used to format the "FORMAT STRING" in the
> Format Into String function.
>
> i looked at the help, but it seemed very nebulous to me. all i need is
> to have "a white space" or a "carriage return" between the string
> members and store it to a file.
>
The format string is basically what ANSI C uses, but that string
function has a dialog to help you build it. Either double click the
node or right click and use the last item.
In the dialog, you can place a format string followed by an exact string
followed by another format
string. For the exact string you can enter a
space to output a white space, but to do a carriage return you have to
use a \n or \r.
Another way to do this, which I think is much easier and easier to read,
is to use the Concatonate Strings node with three inputs. To the top
wire the first string, to the middle wire a string constant from the
next to last row. This is a much cleaner way to do the constants. And
on the bottom input put the other string.
Format into String is much more powerful when appending many types of
data, but the simple append is clearer when it is powerful enough.
Greg McKaskle -
How not to omit leading binary zeros with format into string
I'm using format into string to format serial data . The problem I'm having is that Format into String with "%b" format identifier omits leading zeros
in the string.. ie... "3" becomes "11" when I need it as "0011"
Solved!
Go to Solution.see figure:
Attachments:
Example_VI.png 3 KB -
How to use MD5 format of string
i want to change a password string to md5 format
how can i do ithttp://www.twmacinta.com/myjava/fast_md5.php
Maybe you are looking for
-
I have sent the email autentication at least 5 times and i have not received any email about the password reset. Is there anyother way i could do this?
-
When I print with iphoto or adobe photo shop my photos colours are way way off but if I open photo in preview and print from there they are fine. I use a canon ip8500. any suggestions
-
I HAVE A SOLUTION FOR NOT SEEN IPODS
Hi, I had the same problem of many people, my ipod was not seen by both windows and itunes, Apple Grenoble(France) store invited me to buy another ipod because the repair cost was higher than the price of one, SHAME ON THEM because it was just A PROB
-
I have manually installed Quicktime. I have verified the installation by successfully playing a movie at http://trailers.apple.com/. Still, http://www.merriam-webster.com/audio.php?file=test0001&word=test&text=\%CB%88test\ shows an error message: A p
-
MacBook Pro Retina 2012 sudden reboots
I have a little problem with my MacBook now (Retina Mid 2012 15"). It sometimes, completely randomly, reboots, that is it stops responding, while looping the audio of about last second and then reboots. It runs on the latest version of OS X Yosemite.