search for: empty_el

Displaying 17 results from an estimated 17 matches for "empty_el".

Did you mean: empty_
2009 Jun 02
9
XML::LibXML::Reader
is there anybody who knows how we can get child values using libxml (Reader class) def xml_import_to_brands require''xml'' reader = XML::Reader.file(''c:/brands.xml'') . . .
2017 Dec 05
1
[PATCH] lib: libvirt: stop using <shareable/> for appliance disk (RHBZ#1518517)
...a/lib/launch-libvirt.c b/lib/launch-libvirt.c index e5121799e..5aae1b611 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -985,10 +985,6 @@ static int construct_libvirt_xml_appliance (guestfs_h *g, const struct libvirt_x } \ } while (0) -/* <element/> */ -#define empty_element(element) \ - do { start_element(element) {} end_element (); } while (0) - /* key=value attribute of the current element. */ #define attribute(key,value) \ if (xmlTextWriterWriteAttribute (xo, BAD_CAST (key), BAD_CAST (value)) == -1){ \ @@ -1...
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...start_element ("type") { attribute ("arch", host_cpu); @@ -620,9 +649,9 @@ generate_libvirt_xml (struct config *config, struct data_conn *data_conns, } end_element (); start_element ("features") { - if (config->flags & FLAG_ACPI) empty_element ("acpi"); - if (config->flags & FLAG_APIC) empty_element ("apic"); - if (config->flags & FLAG_PAE) empty_element ("pae"); + if (config->cpu.acpi) empty_element ("acpi"); + if (config->cpu.apic) empty_element (&quo...
2018 Nov 02
0
[PATCH v3 2/4] common/utils: Move libxml2 writer macros to a common header file.
...format ("%d", g->memsize); } end_element (); This commit which is mostly refactoring moves the repeated definitions of these macros into a common header file. I also took this opportunity to change / clean up the macros: - The macros are now documented properly. - comment() and empty_element() macros are now available everywhere. - Error handling has been made generic. - Added do..while(0) around some of the macros to make them safe to use in all contexts. The last point causes the most churn since we must change the callers to avoid format string security bugs. --- commo...
2007 Oct 13
0
5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c test/trace
...wf.trace @@ -167,8 +167,8 @@ childNodes: 0: Loading: xml-parse-2.xml Success: true --- -788 -788 +820 +820 docTypeDecl: <!DOCTYPE foo [ <!ENTITY greeting "hello"> ]> ignoreWhite: true loaded: true @@ -301,7 +301,7 @@ nextSibling: undefined previousSibling: TAG(1): 'empty_element' childNodes: 0: --- -attributes: 1: entities%5Fattribute=%3C%20%3E%20%22%20%27%20%26 +attributes: 1: entities%5Fattribute=%3C%20%3E%20%22%20%27%20%26%20%C2%A0 localName: entities namespaceURI: nodeName: entities @@ -309,18 +309,18 @@ nodeType: 1 nodeValue: null prefix: parentNod...
2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
...string ("%d", g->memsize); } end_element (); This commit which is mostly refactoring moves the repeated definitions of these macros into a common header file. I also took this opportunity to change / clean up the macros: - The macros are now documented properly. - comment() and empty_element() macros are now available everywhere. - Error handling has been made generic. - Added do..while(0) around some of the macros to make them safe to use in all contexts. - Both string() and attribute() take a format string (previously there were string_format() and attribute_format()...
2018 Nov 02
7
[PATCH v3 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html v2 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00051.html v3: - Back to using string/string_format and attribute/attribute_format. - Add both single_element and single_element_format. - Rebased and retested. Rich.
2017 Mar 16
7
[PATCH 0/4] Pass CPU vendor, model and topology from source to target.
This is tangentially related to: https://bugzilla.redhat.com/show_bug.cgi?id=1372668 The problem in that bug is that we didn't pass the source CPU model (Sandybridge in that case) through to the target RHV hypervisor. So when the Windows guest booted on the target it gives an error about CPU hardware being disconnected (although it otherwise boots and works fine). This patch series
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html However it was broken in a few ways. First of all the documentation was broken because "/**" enhanced comments were not permitted on macros. This is fixed in the new 1/4 patch. Secondly we didn't use single_element() everywhere possible, which is fixed in the new 4/4 patch. Lastly I've
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros. Rich.
2017 Mar 17
7
[PATCH v2 0/6] v2v: Pass CPU vendor, model and topology from source to target.
v1 -> v2: - Support for passing topology through -o glance. - Support for passing topology through -o rhv. - Use bool for acpi/apic/pae struct fields in virt-p2v. - Write the xpath expression in error messages instead of file/line. - Fix more memory leaks in virt-p2v cpuid.c. - Passes make check & check-valgrind. There may be some other minor changes. I believe that everything
2007 Dec 20
0
13 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c test/trace
...%20' +lastChild: TEXT(3): '%0A%20%20even%20more%20text%0A' +nextSibling: TAG(1): 'entities' +previousSibling: TEXT(3): 'cruft ' +childNodes: 5: TEXT(3): '%0A%20%20text%0A%20%20',TAG(1): 'child',TEXT(3): '%0A%20%20more%20text%0A%20%20',TAG(1): 'empty_element',TEXT(3): '%0A%20%20even%20more%20text%0A' +--- +attributes: 0: +localName: null +namespaceURI: null +nodeName: null +nodeType: 3 +nodeValue: %0A%20%20text%0A%20%20 +prefix: null +parentNode: TAG(1): 'normal' +firstChild: undefined +lastChild: undefined +nextSibling: TAG(1...
2018 Oct 04
0
[PATCH v2 3/4] inspector: Use libxml writer macros.
...------- 2 files changed, 258 insertions(+), 292 deletions(-) diff --git a/common/utils/libxml2-writer-macros.h b/common/utils/libxml2-writer-macros.h index b5705645a..13cd22ecd 100644 --- a/common/utils/libxml2-writer-macros.h +++ b/common/utils/libxml2-writer-macros.h @@ -79,6 +79,20 @@ #define empty_element(element) \ do { start_element ((element)) {} end_element (); } while (0) +/** + * To define a single element with no attributes containing some text: + * + * single_element ("name", "%s", text); + * + * which produces C<<< &lt...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...\ +#define end_element() \ + while (0); \ + do { \ + if (xmlTextWriterEndElement (xo) == -1) { \ + set_conversion_error ("xmlTextWriterEndElement: %m"); \ + return NULL; \ + } \ } while (0) /* <element/> */ -#define empty_element(element) \ +#define empty_element(element) \ do { start_element(element) {} end_element (); } while (0) /* key=value attribute of the current element. */ @@ -646,16 +646,16 @@ cleanup_data_conns (struct data_conn *data_conns, size_t nr) /* key=value, but value is a printf-style form...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed
2019 Sep 10
3
[PATCH 0/2] Remove virt-p2v from libguestfs
Now that virt-p2v has its own repository [1] and releases [2], it is time to remove it from libguestfs. [1] https://github.com/libguestfs/virt-p2v [2] http://download.libguestfs.org/virt-p2v/ Pino Toscano (2): Remove virt-p2v Remove remaining virt-p2v bits .gitignore | 4 - Makefile.am | 7 +- bash/Makefile.am