Displaying 9 results from an estimated 9 matches for "xmltextwriterstartattribut".
Did you mean:
xmltextwriterstartattribute
2011 Sep 02
1
[PATCH 6/7] hivexml: Report attributes in values instead of text.
..._CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "node"));
@@ -278,7 +279,9 @@ value_string (hive_h *h, void *writer_v, hive_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_va...
2012 Mar 31
2
[PATCH v6] hivexml: Add byte run reporting functions
...st char *str)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
const char *type;
+ int ret = 0;
switch (t) {
case hive_t_string: 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_...
2011 Dec 13
1
[hivex] [PATCH 1/1] hivexml: Change value type output to standard names
...nst char *type, const char *encoding)
@@ -294,7 +320,7 @@ value_string (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
type = "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 **arg...
2011 Dec 08
1
[hivex] [PATCH 8/8] hivexml: Add byte run reporting functions
...st char *str)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
const char *type;
+ int ret = 0;
switch (t) {
case hive_t_string: 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_...
2011 Sep 17
3
[PATCH 1/1] hivexml: Base64-encode non-printable data
...== 0)
+ XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST attr_name, BAD_CAST attr_data));
+ else if (strcmp (encoding_to_use, "base64") == 0) {
+ 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 pr...
2012 Feb 01
1
[PATCH] hivexml
...,9 +323,14 @@ value_string (hive_h *h, void *writer_v,
> type = "unknown";
> }
>
> - start_value (writer, key, type, NULL);
> + int validXML = isValidXMLString(str);
> + start_value (writer, key, type, validXML ? NULL : "base64");
> XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "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)));
&g...
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...switch (t) {
case hive_t_string: type = "string"; break;
@@ -278,9 +348,12 @@ value_string (hive_h *h, void *writer_v, hive_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_...
2011 Dec 13
1
[hivex] [PATCH 2/2] hivex: Expose embedded hive file name
...}
+
int32_t
hivex_major_version (hive_h *h)
{
diff --git a/xml/hivexml.c b/xml/hivexml.c
index 3a4d9b7..059da56 100644
--- a/xml/hivexml.c
+++ b/xml/hivexml.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) {...
2011 Dec 13
1
[hivex] [PATCH 1/2] hivex: Expose hive major and minor version
...if (hive_version_buf == NULL) {
+ fprintf (stderr, _("calloc: failed to allocate version buffer\n"));
+ exit (EXIT_FAILURE);
+ } else {
+ snprintf (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_...