There are three modes of importing item data from an XML format.
The XML data to be imported must adhere to the Document Type Definition (DTD) detailed below. This is supplied with ExtraView, in the WEB-INF/data/xml_dtd directory of your installation, and can be directly referenced from your XML import file or data stream. The file name supplied is extraview_item.dtd.
<?xml version="1.0" encoding="UTF-8" ?>
<!ELEMENT locale (EMPTY) > <!ELEMENT item_list (item*) > <!ELEMENT item_udf (title_specifier?, name_specifier?, CDATA*)> <!ELEMENT item_release (title_specifier?, name_specifier?, short_descr , severity_level , priority , status , product_name , date_created , owner , timestamp , assigned_to , privacy , last_change_user , alt_id , area , project , category , resolution , product_line , date_last_status_change , date_closed , release_found , release_fixed , contact , originator , item_id, item_udf*)> <!ELEMENT item_module (title_specifier?, name_specifier?, assigned_to ,status ,timestamp , rc_version ,last_change_user ,item_module_id )> <!ELEMENT title_specifier (CDATA)> <!ELEMENT name_specifier (#PCDATA)> <!ELEMENT short_descr (CDATA) > <!ELEMENT severity_level (CDATA) > <!ELEMENT priority (CDATA) > <!ELEMENT status (CDATA) > <!ELEMENT product_name (CDATA) > <!ELEMENT date_created (CDATA) > <!ELEMENT owner (CDATA) > <!ELEMENT timestamp (CDATA) > <!ELEMENT assigned_to (CDATA) > <!ELEMENT privacy (CDATA) > <!ELEMENT last_change_user (CDATA) > <!ELEMENT alt_id (CDATA) > <!ELEMENT area (CDATA) > <!ELEMENT project (CDATA) > <!ELEMENT category (CDATA) > <!ELEMENT resolution (CDATA) > <!ELEMENT product_line (CDATA) > <!ELEMENT date_last_status_change (CDATA) > <!ELEMENT date_closed (CDATA) > <!ELEMENT release_found (CDATA) > <!ELEMENT release_fixed (CDATA) > <!ELEMENT contact (CDATA) > <!ELEMENT originator (CDATA) > <!ELEMENT item_id (CDATA) > <!ELEMENT rc_version (CDATA) > <!ELEMENT item_module_id (CDATA) > <!ELEMENT item_attachment (CDATA)> <!ATTLIST item_attachment file_desc CDATA #IMPLIED > <!ATTLIST item_attachment file_name CDATA #IMPLIED > <!ATTLIST item_attachment path CDATA #IMPLIED > <!ATTLIST item_attachment content_type CDATA #IMPLIED > <!ATTLIST item_attachment file_size CDATA #IMPLIED > <!ATTLIST item_attachment date_created CDATA #IMPLIED > <!ATTLIST item_attachment created_by_user CDATA #IMPLIED > |
Note that all data related to items, including repeating records, UDF’s, and attachments are described with the DTD and can all be imported by ExtraView. A portion of a sample XML file is shown below, with two issues to be imported. This references the above DTD. Note that the attachment within the example import file is shortened, for brevity. The following points should be noted about the import of items:
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE extraview_item SYSTEM "file:///C:/path_to_my_dtd/extraview_item.dtd"> <ITEM_LIST> <ITEM> <AREA><![CDATA[Bugs]]></AREA> <PROJECT><![CDATA[&Bugs Data&]]></PROJECT> <CATEGORY><![CDATA[Software]]> </CATEGORY> <PRODUCT_NAME><![CDATA[ExtraView]]></PRODUCT_NAME> <ITEM_UDF> <TITLE_SPECIFIER><![CDATA[OS]]></TITLE_SPECIFIER> </ITEM_UDF> <ITEM_RELEASE> <RELEASE_FOUND><![CDATA[1.2.3.4]]></RELEASE_FOUND> </ITEM_RELEASE> <ITEM_RELEASE> <ITEM_UDF> <TITLE_SPECIFIER> <![CDATA[This is text in a field]]> </TITLE_SPECIFIER> <![CDATA[BILL.SMITH]]> </ITEM_UDF> </ITEM_RELEASE> </ITEM> <ITEM> <CATEGORY> <![CDATA[Software]]> </CATEGORY> <PRODUCT_NAME> <![CDATA[ExtraView]]> </PRODUCT_NAME> <ITEM_UDF> <NAME_SPECIFIER>OP_SYS</NAME_SPECIFIER> <![CDATA[Solaris]]> </ITEM_UDF> <ITEM_RELEASE> <RELEASE_FOUND> <![CDATA[2.3.4.5]]> </RELEASE_FOUND> </ITEM_RELEASE> <ITEM_RELEASE> <ITEM_UDF> <NAME_SPECIFIER>RELEASE_COMMITTED_RELEASE </NAME_SPECIFIER> <![CDATA[5.2.2.1]]> </ITEM_UDF> <RELEASE_FOUND> <![CDATA[2.5.6]]> </RELEASE_FOUND> </ITEM_RELEASE> <ITEM_ATTACHMENT FILE_DESC='Current log file' FILE_NAME='EVJ.log' PATH='C:/t/' CONTENT_TYPE='text/plain' > <ATA[VEhJUyBJUyBBIEZJTEU=]]> </ITEM_ATTACHMENT> </ITEM> </ITEM_LIST> |