Displaying 9 results from an estimated 9 matches for "xmltextwriterendattribute".
2011 Sep 02
1
[PATCH 6/7] hivexml: Report attributes in values instead of text.
..._node_h node, hive_value_h value,
}
start_value (writer, key, type, NULL);
- XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str));
+ XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
+ XML_CHECK (xmlTextWriterWriteString, (writer, str));
+ XML_CHECK (xmlTextWriterEndAttribute, (writer));
end_value (writer);
return 0;
}
@@ -332,7 +335,9 @@ value_string_invalid_utf16 (hive_h *h, void *writer_v, hive_node_h node,
}
start_value (writer, key, type, "base64");
+ XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHE...
2012 Mar 31
2
[PATCH v6] hivexml: Add byte run reporting functions
...ring: type = "string"; break;
@@ -297,8 +369,9 @@ value_string (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str));
XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -307,6 +380,7 @@ value_multiple_strings (hive_h *h, void *writer_v, hive_node_h node,
const char *key, char **argv)
{
xmlTextWriterPtr write...
2011 Dec 08
1
[hivex] [PATCH 8/8] hivexml: Add byte run reporting functions
...ring: type = "string"; break;
@@ -298,8 +369,9 @@ value_string (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str));
XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -308,6 +380,7 @@ value_multiple_strings (hive_h *h, void *writer_v, hive_node_h node,
const char *key, char **argv)
{
xmlTextWriterPtr write...
2011 Sep 17
3
[PATCH 1/1] hivexml: Base64-encode non-printable data
...XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST attr_encoding, BAD_CAST "base64"));
+ XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST attr_name));
+ XML_CHECK (xmlTextWriterWriteBase64, (writer, BAD_CAST attr_data, 0, strlen(attr_data)));
+ XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ } else {
+ fprintf (stderr, "safe_print_string_attribute: Unexpected encoding to use (won't print here).\n");
+ ret = -1;
+ }
+ } else
+ ret = -1;
+ return ret;
+}
+
static int
node_start (hive_h *h, void *writer_v, hive_node_h node, const char *na...
2011 Dec 13
1
[hivex] [PATCH 1/1] hivexml: Change value type output to standard names
...= "unknown";
}
- start_value (writer, key, type, NULL);
+ start_value (writer, key, value_type_windows_string (t), NULL);
XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str));
XML_CHECK (xmlTextWriterEndAttribute, (writer));
@@ -308,7 +334,7 @@ value_multiple_strings (hive_h *h, void *writer_v, hive_node_h node,
const char *key, char **argv)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
- start_value (writer, key, "string-list", NULL);
+ start_value (write...
2012 Feb 01
1
[PATCH] hivexml
...ot;value"));
> - XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str));
> + if (validXML)
> + XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str));
> + else
> + XML_CHECK (xmlTextWriterWriteBase64, (writer, str, 0, strlen(str)));
> +
> XML_CHECK (xmlTextWriterEndAttribute, (writer));
> end_value (writer);
> return 0;
> @@ -310,9 +346,14 @@ value_multiple_strings (hive_h *h, void
>
> size_t i;
> for (i = 0; argv[i] != NULL; ++i) {
> - XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "string"));
> - XML_CHECK...
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
..._node_h node, hive_value_h value,
}
start_value (writer, key, type, NULL);
- XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str));
+ XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
+ XML_CHECK (xmlTextWriterWriteString, (writer, str));
+ XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -289,6 +362,7 @@ value_multiple_strings (hive_h *h, void *writer_v, hive_node_h node,
const char *key, char **argv)
{
xmlTextWriterPtr write...
2011 Dec 13
1
[hivex] [PATCH 2/2] hivex: Expose embedded hive file name
...xml.c
@@ -160,6 +160,15 @@ main (int argc, char *argv[])
}
}
+ char *hive_name = hivex_name (h);
+ if (hive_name) {
+ XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "name"));
+ XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST hive_name));
+ XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ free (hive_name);
+ hive_name = NULL;
+ }
+
int64_t hive_mtime = hivex_last_modified (h);
if (hive_mtime >= 0) {
char *timebuf = filetime_to_8601 (hive_mtime);
--
1.7.6.4
2011 Dec 13
1
[hivex] [PATCH 1/2] hivex: Expose hive major and minor version
...(hive_version_buf, 8, "%" PRIu32 ".%" PRIu32, hive_major_version, hive_minor_version);
+ XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "hive_version"));
+ XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST hive_version_buf));
+ XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ free (hive_version_buf);
+ hive_version_buf = NULL;
+ }
+ }
+
int64_t hive_mtime = hivex_last_modified (h);
if (hive_mtime >= 0) {
char *timebuf = filetime_to_8601 (hive_mtime);
--
1.7.6.4