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 Script {
        pub id: String,
        pub output: String,
    }
}

impl From<&Vec<OwnedAttribute>> for Script {
    fn from(attr: &Vec<OwnedAttribute>) -> Self {
        let mut script = Script::new();
        script.id = get_attr_value_by_name(attr, "id");
        script.output = get_attr_value_by_name(attr, "output");
        script
    }
}