XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
McKyle AdamsSubject: Help with strange XML file - please
Author: McKyle Adams
Date: 11 Jun 2006 01:16 AM
Originally Posted: 11 Jun 2006 12:48 AM
I have an XML file I received from a large corp. - it is generated by them to supposedly make it "easy' for me to bring the data from a transaction into our organization - I'm using an Access database for the time being. Since Access reads only element-centric xml and won't read the file (actually, it reads but makes a bunch of empty tables), I concluded the file is attribute-centric - also based on the file structure. So I went to the MS site and found VB .NET code for converting back and forth between attribute-centric and element-centric and I built a VB .NET app. The code works fine on other examples files, but not on the file of interest - I get warnings from the XML DOM that the code is not attribute-centric, nor is it element-centric. Would someone be willing to look at the file and tell me how I might read it? Thanks very much.

McKyle


UnknownXACTDOC.XML

Postnext
Ivan PedruzziSubject: Help with strange XML file - please
Author: Ivan Pedruzzi
Date: 12 Jun 2006 09:42 AM
Hi McKyle,

It seems like that Microsoft Access doesn't like the document shape.

You may try to use the attached XSLT (Attribute-to-Element.xsl) to pre-process the XML before importing the data.

See how to apply XSLT in the XML Import Wizard here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ac2003_ta/html/odc_ac_xsd.asp

Notice that I ignore the attribute sketchDockInfo because seems to contain only comments

Access text fields are limited to 255 characters so you may see still error after the import.

I am also attaching a XML schema (XACTDOC.xsd) that can be used to instruct the import engine in how to convert the XML.

The XSLT instruction that emits the schema reference is there but commented out for your reference.

Please see the following to learn how MS Access supports XML Schema
http://msdn.microsoft.com/library/en-us/odc_ac2003_ta/html/odc_ac_xsd.asp


Hope this helps
Ivan Pedruzzi
Stylus Studio Team


DocumentAttribute-to-Element.xsl


DocumentXACTDOC.xsd

Postnext
McKyle AdamsSubject: Help with strange XML file - please
Author: McKyle Adams
Date: 12 Jun 2006 12:41 PM
Hello Ivan - thanks very much for the response.

I read the article, and I'm not clear on how to apply the XSLT during import - I may have missed something, but when I run the import per the instructions on that page, I don't see a place to apply the XSLT. Is it automatically applied by naming it the same filename prefix perhaps? I'm sorry I'm being slow about this process - I haven't worked with it before. I also looked at the MS web document regarding the schema (xsd) - the two links appear to be the same page and I guess I'm not clicking to what needs to be done.

It appears I can import the xsd before importing the xml file and it makes tables - is that the preprocessing you were referring to?

Sorry for my lack of understanding, and thanks for your patience.

McKyle

Postnext
Ivan PedruzziSubject: Help with strange XML file - please
Author: Ivan Pedruzzi
Date: 12 Jun 2006 02:48 PM

Sorry wrong link
See the chapter "Import Data" to apply XSLT
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ac2003_ta/html/odc_accessnewxmlfeatures.asp

If the XML document you are trying to import points to a XML Schema like the following example, Access uses the schema information to map the elements to appropriate column types.

<?xml version='1.0' ?>
<XACTDOC
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:///c:/temp/XACTDOC.xsd">
...

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
McKyle AdamsSubject: Help with strange XML file - please
Author: McKyle Adams
Date: 12 Jun 2006 07:32 PM
Ivan, you're a dang genious! Thanks very much - that got me the data in a hell of a lot better shape than before. I think it's all there. How did you generate that xsl file, or is that a generic file? How about the xsd? Did you do those with Stylus Studio?

Thanks again - if you ever come to New Mexico and want to go for a horse ride, look me up - we have 8 percherons (police horses).

McKyle

Postnext
Ivan PedruzziSubject: Help with strange XML file - please
Author: Ivan Pedruzzi
Date: 13 Jun 2006 02:34 PM


The XSLT is a generic trasforation to copy everything and translates attributes into elements.

To generate the schema I used the Stylus Studio XML Editor.

Thank You for the offer if it happens to visit New Mexico I will give a buzz.


Ivan Pedruzzi
Stylus Studio Team

Posttop
Schubert XuSubject: Help with strange XML file - please
Author: Schubert Xu
Date: 23 Aug 2019 09:46 PM
Hi McKyle,

I googled your this 13 years old message. Not sure your XACTDOC.XML was a file from XActimate? Just in case your XACTDOC.XML was from XActimate, I had a XACTDOC.ZIPXML from an ESX file. (After unzip the ESX file, I got the XACTDOC.ZIPXML). Someone said the XACTDOC.ZIPXML is a zip file, unzip it we'll get XACTDOC.XML. But I tried unzip it and it is not a zip file. so I wonder how you got your readable XACTDOC.XML? I mean through some conversions to get the readable XML file?

Thanks
Schubert (in Houston, TX)


UnknownXACTDOC(1).ZIPXML
XACTDOC.ZIPXML

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.