XML :: QOFQSF. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Neil Williams
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~codehelp/
XML :: QOFQSF. ű×
XML :: QOFQSF. ¼³¸í
QSF XML ÆÄÀÏ·Î °³ÀÎ µ¥ÀÌÅ͸¦ º¯È¯ÇϽʽÿÀ XML :: QOFQSF´Â QSF XML·Î Ç¥Çö µÈ ¸ðµç QOF °´Ã¼¿¡ ´ëÇØ ´ÜÀÏ È¨À» Á¦°øÇÕ´Ï´Ù. SQLite ¹é¿£µå¿¡ ºñ½ÁÇÑ ¸ðµâµµ °èȹµË´Ï´Ù. QOF °´Ã¼°¡ Æ÷ÇԵǾî ÀÖÀ¸·Á¸é »ùÇà QSF XML ÆÄÀÏÀ» º¸³»ÁֽʽÿÀ. ÄÜÅÙÃ÷¸¦ ¸¸µå´Â ½ºÅ©¸³Æ®µµ °èȹµÇ¾î ÀÖ½À´Ï´Ù. ÀÛÀº ÄÚµå ½º ´ÏÆê. XML :: QOFQSF QW (QSFPARSE QSFWRITE)¸¦ »ç¿ëÇϽʽÿÀ. Date :: Parse; ³¯Â¥ :: Çü½ÄÀ» »ç¿ëÇϽʽÿÀ. ³» $ FILE = "QSF-MILEAGE.XML"; ³» % obj = qsfparse ( "$ file"); ³» $ ºñ¿ë = $ obj { 'pilot_expenses'}; MY $ EXP_COUNT = @ $ ºñ¿ë; Àμâ "»óÅ : $ EXP_COUNT °æºñ "; ³» $ template ="% a, % o % b % y "; my $ total_miles = 0; foreach my $ a (@ $ ºñ¿ë) {($ a-> type_of_expense eq"¸¶Àϸ®Áö ") {$ total_miles + = $ A-> Expense_Amount; $ a-> expense_amount¸¦ ÀμâÇϽʽÿÀ. "". $ a-> distance_unit. "; $ a-> expense_vendor." ". $ a-> foxense_city; time2str ( $ ÅÛÇø´, $ a-> expense_date). " ";}}"ÇÕ°è : $ Total_miles "; $ C = »õ·Î¿î ¾à¼Ó; $ C-> ¼³¸í ("ªÀº ¿ä¾à "); $ C-> GUID ($ gUID_STR); 5429307BCAE611B59B4E2BEDC77B2D68 $ C-> ³ëÆ® ("±ä ¼³¸í ")¿Í °°Àº # QOF ½Äº°ÀÚ -> repeat_type ( "repeatnone"); # ÆÄÀÏ·µ qof ¼Ò½º $ c-> repeat_forever ( "false"); # boolean $ c-> use_alarm ( "false"); # boolean $ c-> untimed_event ( "false "); #boolean $ c-> transient_repeat ("false "); $ c-> start_time ("2003-08-08T09 : 00 : 00Z "); $ c-> end_time ("2003-08-08T17 : 30 : 00Z "); $ C-> REPEAT_END ("2003-08-08T17 : 30 : 00Z "); $ C-> REPEAT_FREQUENCY (0); $ C-> exception_count (0); $ C-> ¾Ë¶÷ _ADVANCE (0); MY % obj; my @ datebook = (); push @datebook, $ c; $ obj { 'pilot_datebook'} = @datebook; qsfwrite (\ % obj); exportxml :: qofqsf´Â qsf xmlÀ» ±¸¹® ºÐ¼®Çϱâ À§ÇØ µÎ °¡Áö ÇÔ¼ö, qsfparse¸¦ ³» º¸³À´Ï´Ù. ÆÄÀÏ ¹× qsfwrite´Â »õ·Î¿î QSF XML ÆÄÀÏ¿¡ µ¥ÀÌÅ͸¦ ÀÛ¼ºÇÕ´Ï´Ù. QSFPARSE´Â ÆÄÀÏ¿¡¼ Áö¿øµÇ´Â °¢ À¯ÇüÀÇ °´Ã¼ÀÇ ¹è¿·Î µ¥ÀÌÅ͸¦ ÀÐ°í °¢ ¹è¿¿¡ ´ëÇÑ ÂüÁ¶°¡ °´Ã¼ À̸§À» Å°·Î »ç¿ëÇÏ¿© object_list Çؽÿ¡ Ãß°¡µË´Ï´Ù. À¯»ç Çؽà QSFWRIT¿¡ Àü´Þ µÉ ¼ö ÀÖ½À´Ï´Ù e »õ·Î¿î QSF XML ÆÄÀÏÀ» »ý¼ºÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.
XML :: QOFQSF. °ü·Ã ¼ÒÇÁÆ®¿þ¾î