parsenmap 0.1.1

This is a tool for parsing nmap xml file to csv or json
Documentation
use xml::attribute::OwnedAttribute;
use crate::models::helpers::get_attr_value_by_name;

Initializer! {
    #[derive(Debug, Clone)]
    pub struct Address {
        pub kind: String,
        pub addr: String,
    }
}

impl From<&Vec<OwnedAttribute>> for Address {
    fn from(attr: &Vec<OwnedAttribute>) -> Self {
        let mut addr = Address::new();
        addr.addr = get_attr_value_by_name(attr, "addr");
        addr.kind = get_attr_value_by_name(attr, "addrtype");
        addr
    }
}