Newbies lgutherie Posted February 25, 2008 Newbies Posted February 25, 2008 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
Colin Keefe Posted February 25, 2008 Posted February 25, 2008 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.
Fenton Posted February 25, 2008 Posted February 25, 2008 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
Newbies ekimwang Posted June 27, 2008 Newbies Posted June 27, 2008 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.
CCBtx Posted August 31, 2009 Posted August 31, 2009 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
comment Posted August 31, 2009 Posted August 31, 2009 It's a matter of counting the levels and adjusting the number of /*/*/*... accordingly. Personally, I'd rather write explicitly what to get, instead of fiddling with a generic approach (which isn't generic enough to include your example anyway). custom.xsl.zip
CCBtx Posted September 1, 2009 Posted September 1, 2009 ...looks like my XML is much more complex than I hoped. Can you take a look at this attachment and show me how to add style sheet language for multiple child tags... and the child tags for those.. thanks. CCB ArtaExport.xml.txt
comment Posted September 1, 2009 Posted September 1, 2009 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.
CCBtx Posted September 1, 2009 Posted September 1, 2009 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?
CCBtx Posted September 1, 2009 Posted September 1, 2009 ...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
comment Posted September 1, 2009 Posted September 1, 2009 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
CCBtx Posted September 1, 2009 Posted September 1, 2009 Sorry... if you save it without the ".txt" extension, you can properly read the XML. I should have saved it as .zip. My apologies.
comment Posted September 1, 2009 Posted September 1, 2009 Huh? What's this in reference to? I believe I read your XML properly.
CCBtx Posted September 2, 2009 Posted September 2, 2009 Sorry.... I misunderstood you... After working all day... and your help... I'm fixed (I think) Thanks a lot. CCB ;)
Recommended Posts
This topic is 5561 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 accountSign in
Already have an account? Sign in here.
Sign In Now