Skip to main content

xml_in

Function xml_in 

Source
pub fn xml_in(
    text: &[u8],
    document: bool,
    warn: &mut dyn FnMut(String),
) -> Result<(), TypeError>
Expand description

xml_in, which checks that the text is a well formed document when document is true, or well formed content when it is false. The text ends at the first zero byte, as libxml2 sees it. warn gets the text of each warning of libxml2, which PostgreSQL reports with the SQLSTATE 01000 before the error.

ยงErrors

2200M for a document and 2200N for content that is not well formed, with the messages of libxml2 as the detail.