Menu

Flat2xml conversion problem

Help
2003-10-22
2003-10-30
  • Hagop Chemedikian

    Hello,
    I'm trying to imlement a flat file to xml conversion using "segmented line" paragraph. I read in the user documentation that it's possible to perform a CVS conversion in a segmented line paragraph.  When I insert the cvs-fileds tag in the conversion configuration file paragraph I got an error:
    java.lang.NoSuchMethodException: No such accessible method: addCsvField() on object: com.babeldoc.conversion.flatfile.digester.LineSegment
    Intsead, if I use the line-fields tag there everything OK. Is this a BUG or I'm doing something wrong? 
    Thanks

    PS I'm using Babeldoc 1.2RC2

     
    • bruce mcdonald

      bruce mcdonald - 2003-10-22

      Hi,

      Please post your xml file and a sample input file and I will take a look at it.

      thanks,
      Bruce.

       
    • Hagop Chemedikian

      The xml conversion file is :
      <?xml version="1.0" encoding="UTF-8"?>
      <conversion>
          <header>
              <output-document>
                  <root-element>order</root-element>
                  <row-element>not-applicable-here</row-element>
              </output-document>
              <input-document>
                        <conversion-type>segmented-line</conversion-type>
                  <line-ending>CR</line-ending>
                  <field-separator>+</field-separator>
              </input-document>
          </header>
          <line-segments>
              <segment>
                  <segment-name>header</segment-name>
                  <segment-column>1</segment-column>
                  <segment-width>3</segment-width>
                  <segment-value>UNH</segment-value>
                  <begin-group-name>group</begin-group-name>
                  <csv-fields>
                      <field>
                          <field-name>test1</field-name>
                          <field-number>1</field-number>
                      </field>
                      <field>
                          <field-name>test2</field-name>
                          <field-number>2</field-number>
                      </field>
                      <field>
                          <field-name>test3</field-name>
                          <field-number>3</field-number>
                      </field>
                  </csv-fields>
              </segment>
          </line-segments>
      </conversion>

      while the input file is :
      UNH+ONE+TWO+THREE

      Thank you
      Hagop

       
    • bruce mcdonald

      bruce mcdonald - 2003-10-28

      I have duplicated this error - I will be submitting a fix to CVS.  I will keep you posted.

       
    • bruce mcdonald

      bruce mcdonald - 2003-10-28

      I have isolated and fixed the code.  There are two problems. 

       
    • Hagop Chemedikian

      Thanks
      Hagop

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.