Format/Indent single line XML
Posted: Sun Mar 10, 2013 4:38 am
I have an XML without any whitespace between tags. I'm expecting Format/Indent to insert line feeds between tags but I get this output instead:
If I search/replace all '><' with '> <' then format/indent works as expected.
SECOND ISSUE: This file comes from IE posted to a server (MIME text/xml) and saved to disk before launching oXygen. It has this doctype declaration which when loaded into oXygen appears as Chinese characters. Deleting the doctype declaration then has oXygen load the file as it appears above. I have yet to figure out why IE is generating a utf-16 encoding instead of a utf-8 encoding.
<?xml version="1.0" encoding="UTF-16"?>
Code: Select all
<dataset oid="opalobj-92" currentuser="20014" systemdate="2013-03-09"
disableCapture="true" skip_pkey="true"><transaction txdef="injury"
txtype="update" txseq="1" extid="_561049"><injr_id type="number"
length="0" nullable="n" pkey="y" pval="561049"
>561049</injr_id><zip_cd type="varchar2" length="15" nullable="y"
>02903</zip_cd><injr_loc_stt_othr_cntry type="varchar2" length="20"
nullable="y"/><injr_loc_text type="varchar2" length="60"
nullable="y"/><unusual_clm_typ_cd type="varchar2" length="15"
nullable="y"/><injr_src_cd type="varchar2" length="15" nullable="y"
SECOND ISSUE: This file comes from IE posted to a server (MIME text/xml) and saved to disk before launching oXygen. It has this doctype declaration which when loaded into oXygen appears as Chinese characters. Deleting the doctype declaration then has oXygen load the file as it appears above. I have yet to figure out why IE is generating a utf-16 encoding instead of a utf-8 encoding.
<?xml version="1.0" encoding="UTF-16"?>