English 中文(简体)
• 如何用 per或 j字整理工业基金会类别档案?
原标题:how to parse Industry Foundation Classes (IFC) files using perl or javascript?

I have seen the parsing with JAVA but i need to parse the same IFC extension files which consists of object oriented framework and entity represented blocks using javascript or perl. A basic idea will be a lot helpful.

<>Sample IFC file:

ISO-10303-21;
HEADER;
FILE_DESCRIPTION(( ViewDefinition [CoordinationView] ), 2;1 );

FILE_NAME(
/* name */  C:\sample.ifc ,
/* time_stamp */  2012-05-18T13:15:15 ,
/* authorization */  None );

FILE_SCHEMA (( IFC2X3 ));
ENDSEC;

DATA;

#1= IFCAPPLICATION(#2, 0.5.29.0 , ssiRhinoIFC - Geometry Gym Plug-in for Rhino3d , ssiRhinoIFC );
#2= IFCORGANIZATION($, Geometry Gym Pty Ltd ,$,$,$);
#3= IFCPERSONANDORGANIZATION(#4,#5,$);
#4= IFCPERSON($, Jon ,$,$,$,$,$,$);
#5= IFCORGANIZATION($, UNKNOWN ,$,$,$);
#6= IFCOWNERHISTORY(#3,#1,$,.ADDED.,1337346830,$,$,1337346830);
#7= IFCCARTESIANPOINT((0.0,0.0,0.0));
#8= IFCDIRECTION((1.0,0.0,0.0));

ENDSEC;

END-ISO-10303-21;
问题回答

采用了哪一种格式? 如果IFC-XML能够使用Perl-XML模块。

http://perl-xml.sourceforge.net/faq/





相关问题
Why does my chdir to a filehandle not work in Perl?

When I try a "chdir" with a filehandle as argument, "chdir" returns 0 and a pwd returns still the same directory. Should that be so? I tried this, because in the documentation to chdir I found: "...

How do I use GetOptions to get the default argument?

I ve read the doc for GetOptions but I can t seem to find what I need... (maybe I am blind) What I want to do is to parse command line like this myperlscript.pl -mode [sth] [inputfile] I can use ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签