If the data is a tag, the compressing apparatus 2 directs the COC outputting unit 106 to output COC, while directing the switching control unit 105 of the coding process unit 103 a to switch output of the document instance data to the tag coding unit 103.