Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7414 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello, I am new to the forum, and pretty new to FileMaker. I need to send text and numerical data in XML to this guy that uses Visual Basic, and requests that I export the data out of my FileMaker databases in an XML format such that it has a CRLF (carriage return/line feed). Form what I have been reading, I might need the appropriate XSL sheet, since the XML format generated by FileMaker without the use of an XSL sheet I guess does not create a CRLF I guess. Designing an XSL sheet is well beyond my current knowledge. Is there an existing XSL sheet that I could have access to that would fit my needs? I did some searching on the web but did not find an xsl sheet that referred to CRLF at all. What other options do I have?

Thanks so much in advance,

Marcelo.

Posted

I guess I don't understand your question. If this VB guy is "TRUELY" using XML, the CRLF is immaterial. I sounds to me that he is really treating the XML output as a TAB delimited text file that has the advantage of showing the field names.

True XML-enabled database systems are able to reconcile field names if the data structure is the same (i.e. field names match). XSLT files are really only needed to convert the XML data output to a readable file format such as HTML, Word, RTF, PDF, or other display formats. They can also be used to reformat the output data to a 'native' format, provide process instructions/commands, such as SQL so the SQL target will see it as 'native' and apply the correct action to the data.

Posted

I don't know whether the "VB guy" is actually treating the XML output as a tab delimited text file or not, I do know he needs to match the field names in the XML file I export out of FileMaker with the ones he has in his XML schema (xsd extension), so he can load the data I send to him into his system. His problem is that he receives the data in my XML file as one long string of text, without separations between the different records and the data tied to each record. That is why he claims he needs a CRLF. Given the situation and my lack of knowledge about XML, I thought maybe using an XSLT sheet that would create a CRLF after each record would solve the problem. What do you think about this know? Can the problem be solved without the use of an XSLT sheet?

Thanks so much for your feedback!

Posted

<?xml version="1.0" encoding="UTF-8" ?><FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult"><ERRORCODE>0</ERRORCODE><DATABASE>TextOutput.fp7</DATABASE><LAYOUT></LAYOUT><ROW MODID="2" RECORDID="1"><textoutput>This is a bunch of text.</textoutput><Text2>This is text 2.</Text2></ROW></FMPDSORESULT>

This is what native FMPDSORESULT looks like. There are NO carriage returns of any kind. XML does NOT care whether there are; neither does HTML, which is a subset of the same parent, SGML. It's only when you output "text" that it matters, or for reading purposes.

The <ROW> element (which looks like <ROW MODID="2" RECORDID="1"> with its attributes) is the "record" beginning, </ROW> is the end.

I ran the TidyHTML tool on it (available for all platforms). It put returns; but only to make it readable.

<?xml version="1.0" encoding="utf-8"?>

<FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">

<ERRORCODE>0</ERRORCODE>

<DATABASE>TextOutput.fp7</DATABASE>

<LAYOUT></LAYOUT>

<ROW MODID="2" RECORDID="1">

<textoutput>This is a bunch of text.</textoutput>

<Text2>This is text 2.</Text2>

</ROW>

</FMPDSORESULT>

I don't know what that guy's working with, but it doesn't sound like he knows what he's doing with XML.

Posted

I am confused about your response, and please forgive my software ignorance: in order for me to put returns in the XML file, do I need to use Tidy? Can I put something like the code you wrote in your message in an XSLT sheet to modify the XML file as it comes out of FileMaker instead of using another application like Tidy? I downloaded Tidy for Windows 2000/XP from Sourceforge.net and it is not like other programs I have used before, so before I start learning how to use it, I thought I would confirm that I must use it in order to put those returns. Does the code you wrote have anything to do with Tidy or was it just an example of how things looks in the DSO FM output vs. after using Tidy? Finally, you said Tidy put returns but only to make it readable. What does that mean, will this guy be able to use his xsd schema to extract the data in the XML Tidied file or not?

Posted

Tidy is just an XML (or HTML) testing/formatting tool. It has nothing really to do with what you're trying to do. I was just trying to show you that real XML does not care whether there are carriage returns or not. That is not how XML works. It has its own rules. They are strict. Otherwise it would not be a reliable language for comminication or transformation.

It is the <ROW> element which determines where a record starts and </ROW> where it ends. That's just about says everything.

We're going to need more info, and probably examples, before we can figure out how to output what this guy wants. It's not standard XML; and it's not a platform issue, as you're all on Windows. I can't guess what he wants; I'd say it's his responsibility to explain himself.

You could somehow add a CRLF after each row, like this:

<xsl:text>&#13;&#10;</xsl:text>

But it's weird (not XML really, it's text with XML tags); it would require an XSL file to do that. Furthermore, he says he needs this in order to validate with his XSD Schema. That just seems crazy, considering using Schema is a higher order of XML. I'm no XML expert; it makes no sense to me.

If you used something like Tidy, then you could add carriage returns after each line, just for looks, if that's his problem. You could do much the same with the <output> element, indent attribute:

<xsl:output method="text" version="1.0" encoding="iso-8859-1" indent="yes"/>

But then it's text, not real XML (if that matters), and needs a XSL file.

This topic is 7414 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.