msxml4

MSXML4 and setting the encoding string

≯℡__Kan透↙ 提交于 2019-12-25 01:06:45
问题 I using MSXML4 to generate a XML. I'm trying to set the encoding value to UTF-8. Here is my code: const _bstr_t k_XML_Tag_Name ("xml"); const _bstr_t k_Processing_Tag_Name ("version=\"1.0\" encoding=\"utf-8\""); MSXML2::IXMLDOMProcessingInstructionPtr pProccessingInstruction = m_pXmlDoc->createProcessingInstruction(k_XML_Tag_Name, k_Processing_Tag_Name); HRESULT result = m_pXmlDoc->appendChild(pProccessingInstruction); result is always S_FALSE and the preprocessing string is: <?xml version="1

XSLT nested sort / for-each

懵懂的女人 提交于 2019-12-13 14:12:29
问题 I am trying to figure out the best way to perform a nested for-each & sort. For example my XSLT below performs the following: Selects a node set. Sorts by Date attribute. Performs position() to pull 4 nodes. Now, the next part is what I am trying to figure out. After step 3 I need to sort by the Date attribute again, but this time in asceding order...now that the data set is narrowed down to 4 nodes. Suggestions? Thanks for the help!! XSLT: <xsl:template name="AdmissionsNewsList"> <ul class=

Asynchronous MSXML2 XMLHTTP Request in code behind

一曲冷凌霜 提交于 2019-12-13 07:17:11
问题 I want asynchronous HTTP call back to work in C# with MSXML2 APIs. I am calling this via a winform. x = new MSXML2.XMLHTTPClass(); x.open("POST", "http://localhost/MyHandler.ashx", true, null, null); x.send("<test/>"); x.onreadystatechange = ???? //// What to specify here in C#? var response = x.responseText; //// Works great synchronous! I tried Action(), anonymous delegates, anonymous types but nothing works! Sadly on the internet this VB.NET Module driven solution exists but I am not sure

Need help stopping MSXML from adding namespaces

徘徊边缘 提交于 2019-12-11 12:13:45
问题 I am using MSXML 4 to generate the following xml string: <?xml version="1.0"> <Parent_Element xmlns="http://1"> <Child_One> <Child_Two xmlns="http://2"> <Child_Three> </Child_Three> </Child_Two> </Child_One> </Parent> However the output from my IXMLDOMDocument2Ptr always includes a namespace for Child_Three: <?xml version="1.0"> <Parent_Element xmlns="http://1"> <Child_One> <Child_Two xmlns="http://2"> <Child_Three xmlns="http://1"> </Child_Three> </Child_Two> </Child_One> </Parent> My

How do I append elements with duplicate names using MSXML & C++?

吃可爱长大的小学妹 提交于 2019-12-11 11:36:58
问题 I am write some code to update a XML DOM using MSXML4 & C++. I need a method that appends a child element to a parent element. The code I have written below works until the title of the child matches the title of another child under the parent. I cannot change the title of the children so I need to find a way to append them to the parent. Can anyone provide some guidance? // this call creates '<parent><child/></parent>' AppendChild("/root/parent", "child"); // this call attempts to create '

XSLT/XPath : No upper-case function in MSXML 4.0?

醉酒当歌 提交于 2019-11-30 18:02:13
问题 I try to use upper-case() in an XPATH, my parser is MSXML 4.0, and I get : upper-case is not a valid XSLT or XPath function. Is it really not implemented ? 回答1: There are no functions in xslt 1.0 to convert to uppercase or lowercase. Instead do the following: If it is required in a lot of places: Declare these two xsl variables (this is to make the xslt more readable) <!-- xsl variables up and lo and translate() are used to change case --> <xsl:variable name="up" select="