Delete Empty tag from xmltype oracle

后端 未结 2 969
遥遥无期
遥遥无期 2021-01-24 07:27

i want try to delete the empty tag from xmltype. I Have generate the below xml from oracle type. In the collection few elements does not have values so i generated with empty ta

2条回答
  •  礼貌的吻别
    2021-01-24 08:08

        SELECT
            deletexml(xml_data, '//*[not(text())][not(*)]').getstringval()
        FROM
            (
                SELECT
                    xmltype('
        
          9999
          S
          Test Location 
          08 
           
           
           
        
        '
                    ) xml_data
                FROM
                    dual
            )
    

    this is working fine thanks

提交回复
热议问题