Menu

#138 Attribute names contain $ in XML file couse DbUnit corrupted

closed-duplicate
None
5
2008-10-01
2007-03-12
No

Dear sir,

I have a problem in DbUnit ,i'd like to help me to fix this problem as soon as possible.

I don't know if this problem take it in consider in DbUnit when you developed it .

When i use the DbUnit at the first time,The problem if the column attribute name in Flat XML file for any table contain "$" like the example below (which is the dataSet flat xml file exported from group_memebrs table using dbUnit) the compare or exporte all will be field becuase the "$" will make the XML File parser corrupted.

<?xml version='1.0' encoding='UTF-8'?>
<dataset>
<GROUP_MEMBERS USER_ID="58" MEMBER_USER_ID="11" ETQ$RECORD_ORDER="2"/>
<GROUP_MEMBERS USER_ID="58" MEMBER_USER_ID="556" ETQ$RECORD_ORDER="0"/>
<GROUP_MEMBERS USER_ID="58" MEMBER_USER_ID="557" ETQ$RECORD_ORDER="1"/>
<GROUP_MEMBERS USER_ID="50" MEMBER_USER_ID="11" ETQ$RECORD_ORDER="0"/>
<GROUP_MEMBERS USER_ID="58" MEMBER_USER_ID="11" ETQ$RECORD_ORDER="2"/>
<GROUP_MEMBERS USER_ID="58" MEMBER_USER_ID="556" ETQ$RECORD_ORDER="0"/>
<GROUP_MEMBERS USER_ID="58" MEMBER_USER_ID="557" ETQ$RECORD_ORDER="1"/>
<GROUP_MEMBERS USER_ID="70" MEMBER_USER_ID="70" ETQ$RECORD_ORDER="2"/>
<GROUP_MEMBERS USER_ID="70" MEMBER_USER_ID="71" ETQ$RECORD_ORDER="0"/>
<GROUP_MEMBERS USER_ID="70" MEMBER_USER_ID="545" ETQ$RECORD_ORDER="1"/>
<GROUP_MEMBERS USER_ID="501" MEMBER_USER_ID="153" ETQ$RECORD_ORDER="2"/>
<GROUP_MEMBERS USER_ID="501" MEMBER_USER_ID="500" ETQ$RECORD_ORDER="0"/>
<GROUP_MEMBERS USER_ID="501" MEMBER_USER_ID="502" ETQ$RECORD_ORDER="1"/>
<GROUP_MEMBERS USER_ID="501" MEMBER_USER_ID="548" ETQ$RECORD_ORDER="3"/>
</dataset>

Please if you can test and make the same senario and see what happend.

i'd like to help me how can i fix this problem .. how can deal with this kind of character , theres any solution in DbUnit can replace this character in flat xml file when it exported, or make DbUnit ignore this character in any operation such as export or insert or comparing, or other solutions.

Your Cooperation in this matter will be highly appreciated.

Kind Regards

Thamer Al Saradeeh

Discussion

  • J2EE Developer for Etq Inc

    Flat XML File Contain $ for attaribute name

     
  • J2EE Developer for Etq Inc

    • summary: $ for attribute name in Flat XML cause corruption in DbUnit --> attribute names contain $ in XML file couse DbUnit corrupted
     
  • J2EE Developer for Etq Inc

    • summary: attribute names contain $ in XML file couse DbUnit corrupted --> Attribute names contain $ in XML file couse DbUnit corrupted
     
  • Roberto Lo Giacco

    Logged In: YES
    user_id=57511
    Originator: NO

    I suggest to use some other form of dataset instead of FlatXml... like CSV which should not be affected by the naming problem

     
  • matthias g

    matthias g - 2008-09-16
    • status: open --> pending-duplicate
     
  • matthias g

    matthias g - 2008-09-16

    A solution would be the one discussed in bug #2089394 (see http://sourceforge.net/tracker/index.php?func=detail&aid=2089394&group_id=47439&atid=449491\). It discusses special character handling in XML attributes where the column name (= XML attrib name) contains at least one special character.

    I will set this issue to pending for now.

    Please let me know if this is okay for you.

    Regards,
    mat

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-duplicate --> closed-duplicate
     

Log in to post a comment.

MongoDB Logo MongoDB