Jump to content
Server Maintenance This Week. ×

import xml error


lgutherie

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

Recommended Posts

  • Newbies

I am a newbie. My client uses FileMaker 6 and I am attempting to import data stored in mySQL via phpadmin to an XML file, then into FileMaker. On import to filemaker, I get the error:

XML parsing error:

Unknown element "cliniciansmember'

Line: 288

col number:26

I am attaching the XML file (saved as txt) in case someone will look at it and tell me my problem. I hope you can help. We are expecting around 900 registrants for a conference and would like to not have to enter them all by hand. : Thank you in advance for any help.

Linda

onlineregistrations_4_.txt

Link to comment
Share on other sites

The XML you're trying to import needs to be in the FMPXMLRESULT grammer for FileMaker to know what to do with it. You can apply an XSLT stylesheet document to perform this translation in the Import XML Data Source dialog - the place for doing it is in the bottom half of the dialog.

You'll need to find or create an XSLT stylesheet that will perform this translation, though. Offhand I don't know of any for phpMyAdmin -> FileMaker.

Link to comment
Share on other sites

If you know where the xml file is then you can use Import XML, with an XSL stylesheet, as Colin says. Your XML structure is pretty simple. I believe you can just use this generic XSL,* which is from the FileMaker Examples folder, on the FileMaker XSL Library page.

http://www.filemaker.com/products/technologies/xslt_library.html

*Complete with lengthy text from their legal department :-]

msdso_elem.xslt.zip

Link to comment
Share on other sites

  • 4 months later...
  • Newbies

Fenton - I just had the same issue. After several days of research into stylesheets with no luck finding one that worked, I found this thread and *voila* problem solved. Thanks ~ gotta love the online community.

Link to comment
Share on other sites

  • 1 year later...

Help please... I downloaded that style sheet.

It works... partially... but I think my xml has more layers than this style sheet expects.

Here is my XML:

false

false

Currency Transaction Report

64

Currency Transaction Report

34

The supplied datasheet imports the field WdsSupportDc_8 = "falsefalseCurrency Transaction Report64Currency Transaction Report34"

...when actually, it should import:

CsrDisplay=false

Active=false

UiName=Currency Transaction Report

ScreenID=64

Name=Currency Transaction Report

ModelId=34

I am using the xslt (msdso_elem.xslt.zip) style sheet that Fenton suggested.

QUESTION.

How do I expand this sample XSL Style Sheet to include those deeper level field names and data?

Thanks,

CCB

Link to comment
Share on other sites

No, because I don't know what the structure of your document is and what do you want to extract out of it.

In general, you need to identify which element constitutes a record and create a for each instance thereof. Then pick the specific values to populate the fields.

If an element is nested in another, use a path like:

select="parent/child"

to select it.

Link to comment
Share on other sites

I understand what you are saying. Here is my problem. In that file that I sent you, many of the fieldnames that I need are duplicate names under different child tags.

For example, you sent me the code for:

...but I also need to get those field names for

"BSI/DTA/WdsSupportDc_7" and

"BSI/DTA/WdsSupportDc_6" (amoung others)

so I added this to your example:

...but when I import, I just get 1 list of fieldnames. How do I separate the child tags into different field names?

Link to comment
Share on other sites

...I just looked at the import again.

I am importing 3 records for

CsrDisplay

Active

UiName

ScreenIdName

ModelId

...when actually, they should all be under 1 record... just named according to their parent.

Their parents are WdsSupportDc_8,WdsSupportDc_7 and WdsSupportDc_6

Thanks

Link to comment
Share on other sites

I am not sure what you mean. AFAICT, the entire XML is one giant record - it has no repeating elements which could automatically be turned into records.

If you want to keep it this way, and import everything into a single record, you will need to add more fields in the section, and get rid of the element. I don't see why you would want to do it this way, but here's a start.

custom.xsl.zip

Link to comment
Share on other sites

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