From: Friedel Jantzen on 22 Oct 2009 02:54 Am Wed, 21 Oct 2009 08:24:02 +0200 schrieb Alain: > "Friedel Jantzen" <nospam_plz(a)freenet.de> a �crit dans le message de news: > ti4e7pat8nng$.1mxivpgu5pa14.dlg(a)40tude.net... > >> Then I was stuck with the remaining error, occuring twice: >> 'setProperty' is not an element of 'MSXML2::IXMLDOMDocument' >> There is no setProperty method. > > It should be IXMLDOMDocument2 > If you check the generated msxml3.tlh file, it would be strange that there > is no setProperty method for IXMLDOMDocument2 This was it! Thank you, Alain.
From: Friedel Jantzen on 22 Oct 2009 03:18 Thank you, Larry, with your hints I can run your code. > MSXLM's documentation recommends using MSXLM 6.0 for new > applications, so I think I'm justified in attempting the conversion. It is recommended by MS (improved security), but it could happen, that the user must install it first. > However, I'm new to XML and I'm just copying the SelectionLanguage and > SelectionNamespaces property values without really understanding their > contents. The MSDN sample uses a xsl input; you use xml, imo you can omit setting the SelectionNamespaces property. I added a xml declaration at the beginning to declare the utf-8 encoding. The parser starts at the root, so you can address a node relative like this: const char *expression = "email/record_key/test_element/@attribute1"; Note the slash before the at. (For absolute addressing the expression starts with a slash.) Instead of UTF8_CODEPAGE you can use CP_UTF8, and DIM can be replaced by _countof() (MSVC specific). Regards, Friedel
From: Larry Lindstrom on 23 Oct 2009 04:18 On Oct 22, 12:18 am, Friedel Jantzen <nospam_...(a)freenet.de> wrote: > Thank you, Larry, > with your hints I can run your code. > > > MSXLM's documentation recommends using MSXLM 6.0 for new > > applications, so I think I'm justified in attempting the conversion. > > It is recommended by MS (improved security), but it could happen, that the > user must install it first. > > > However, I'm new to XML and I'm just copying the SelectionLanguage and > > SelectionNamespaces property values without really understanding their > > contents. > > The MSDN sample uses a xsl input; you use xml, imo you can omit setting the > SelectionNamespaces property. > I added a xml declaration at the beginning to declare the utf-8 encoding. > > The parser starts at the root, so you can address a node relative like > this: > const char *expression = "email/record_key/test_element/@attribute1"; > Note the slash before the at. > (For absolute addressing the expression starts with a slash.) > > Instead of UTF8_CODEPAGE you can use CP_UTF8, > and DIM can be replaced by _countof() (MSVC specific). > > Regards, > Friedel Thanks Again Friedel and everybody: I pulled the SelectionNamespaces property from the sample, and my implementation, re-composed some of the expressions I was using to select nodes from the XML. Things are now working. I was using the examples for extracting XML attributes at http://www.tizag.com/xmlTutorial/xpathattribute.php Their sample expression for attribute is: inventory/snack/chips(a)supplier Notice the absence of "/" between node and attribute. It seems I haven't composed some other expressions either. Prefacing node names that aren't at the root with "//" also works. As stated before, I appreciate everybody's assistance. Thanks Larry
From: Friedel Jantzen on 23 Oct 2009 09:27 Hi Larry! Am Fri, 23 Oct 2009 01:18:08 -0700 (PDT) schrieb Larry Lindstrom: .... > I was using the examples for extracting XML attributes at > > http://www.tizag.com/xmlTutorial/xpathattribute.php > > Their sample expression for attribute is: > > inventory/snack/chips(a)supplier > > Notice the absence of "/" between node and attribute. IMO this is a typo. XPath doc: http://www.w3.org/TR/1999/REC-xpath-19991116 If you happen to speak a little bit German, here are easy-to-understand samples: http://de.selfhtml.org/xml/darstellung/xpathsyntax.htm#attribute > It seems I haven't composed some other expressions either. > Prefacing node names that aren't at the root with "//" also works. > // is the short form of /descendant-or-self::node()/ The parser works the context node and its subtree (this can be a performance hit). Have a nice weekend, Friedel
First
|
Prev
|
Pages: 1 2 Prev: XSLT messages with DOM smart pointers in C++ Next: Question about win32 C++ roles |