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

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

Recommended Posts

Posted

Hello, my problem is with Filemaker 13 and PHP API

 

i have this code:

 

$request = $fm->newFindCommand($layout);
$request->addFindCriterion($name, $request_name);
$result = $request->execute();
 
 
and error throwing me is:
 
[error_message_prefix] =>
[mode] => 1
[level] => 1024
 =>
[message] => XML error: Not well-formed (invalid token) at line 1
 
who can guide me or help with this please...pleaseeee
Posted

manually create the same URL as the PHP API would do and then inspect the XML returned by FM...

 

sorry, but I do not understand how to do what you tell me, I'm a newbie :(

Posted

Look on the FM website for the document named "Custom Web Publishing with XML", it will show how you can construct a URL that is the equivalent of your PHP request.  When you use that in a browser, you will get XML back from FM or an error.  That way you can inspect both your request and what FMS sends back.

 

From the document a quick example:

http://host/fmi/xml/fmresultset.xml?-db=vetclinic&-lay=animals&-query=(q1);(q2);!(q3)&-q1=typeofanimal&-q1.value=Cat&-q2=typeofanimal&-q2.value=Dog&-q3=name&-q3.value=Fluffy&-findquery
Posted

 

Look on the FM website for the document named "Custom Web Publishing with XML", it will show how you can construct a URL that is the equivalent of your PHP request.  When you use that in a browser, you will get XML back from FM or an error.  That way you can inspect both your request and what FMS sends back.

 

From the document a quick example:

http://host/fmi/xml/fmresultset.xml?-db=vetclinic&-lay=animals&-query=(q1);(q2);!(q3)&-q1=typeofanimal&-q1.value=Cat&-q2=typeofanimal&-q2.value=Dog&-q3=name&-q3.value=Fluffy&-findquery

 

This XML file does not appear to have any style information associated with it. The document tree is shown below.

 

this is what returns

 

 

And the URL is: 

 

http://192.168.1.122/fmi/xml/FMPXMLRESULT.xml?-db=BIOPSIAS&-lay=MENU&-max=50&-findall

 

:(

Posted

Obviously that link is not available outside your network.

Did you intend to include a picture of the document tree?

 

Try the link in a developer-friendly browser like FireFox.  Safari for instance sucks at troubleshooting this kind of thing.

 

Also, use fmresultset not the old FMPXMLRESULT grammar

  • Like 1
Posted

Obviously that link is not available outside your network.

Did you intend to include a picture of the document tree?

 

Try the link in a developer-friendly browser like FireFox.  Safari for instance sucks at troubleshooting this kind of thing.

 

Also, use fmresultset not the old FMPXMLRESULT grammar

 

 

 

in google chrome show this:

 

<fmresultset xmlns="http://www.filemaker.com/xml/fmresultset" version="1.0">
<error code="954"/>
<product build="04/08/2014" name="FileMaker Web Publishing Engine" version="13.0.2.290"/>
<datasource database="" date-format="" layout="" table="" time-format="" timestamp-format="" total-count="0"/>
<metadata/>
<resultset count="0" fetch-size="0"/>
</fmresultset>
 
 
in firefox show this:
 
write error XML: element not found
line number 1, column 1:
Posted

That's actually helpful - FileMaker Error 954: Unsupported XML grammar (returned only by web-published databases)

 

And you may well also have bad characters in your dataset... But with your system on an internal network, there's not a lot of troubleshooting we can do for you

Posted

 

 

write error XML: element not found
line number 1, column 1:

 

 

 

 

A couple of things in your request:

http://192.168.1.122/fmi/xml/fmresultset.xml?-db=BIOPSIAS.fmp12&-lay=LISTADO+M%C3%89DICOS&-max=50&-find

- you do not need to specify the file extension

- your layout name contains troublesome characters, stick to a-z, A-Z, 0-9 for all things that you need to touch from externall (layouts, scripts, fields,...)

- you did not specify any search criteria, try -findall in that case

Posted

Obviously that link is not available outside your network.

Did you intend to include a picture of the document tree?

 

Try the link in a developer-friendly browser like FireFox.  Safari for instance sucks at troubleshooting this kind of thing.

 

Also, use fmresultset not the old FMPXMLRESULT grammar

 

 

If your browser likes to "pretty print" the xml, try viewing the source to get the raw xml returned.

This topic is 3631 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.