I'm developing a C# application that uses a handful of XML files and some classes in System.Xml. A coworker insists on adding the MSXML6 redistributable to our install, along with the .NET framework but I don't think the .NET framework uses or needs MSXML in anyway. I am well aware that using MSXML from .NET is not supported but I supp...
I'm writing some xlst file which I want to use under linux and Windows.
In this file I use node-set function which declared in different namespaces for MSXML and xsltproc ("urn:schemas-microsoft-com:xslt" and "http://exslt.org/common" respectively). Is there any platform independent way of using node-set?
...
I want something like this:
<msxsl:script language="C#">
??? getNodes() { ... return ... }
</msxsl:script>
<xsl:for-each select="user:getNodes()">
...
</xsl:for-each>
What return type should i use for getNodes() and what should i put in it's body?
...
I'm writing out XML files using the MSXML parser, with a wrapper I downloaded from here: http://www.codeproject.com/KB/XML/JW_CXml.aspx. Works great except that when I create a new document from code (so not load from file and modify), the result is all in one big line. I'd like elements to be indented nicely so that I can read it easily...
I have several xml files, the names of which are stored in another xml file.
I want to use xsl to produce a summary of the combination of the xml files. I remember there was a way to do this with the msxml extensions (I'm using msxml).
I know I can get the content of each file using select="document(filename)" but I'm not sure how to ...
Is it possible to do the equivalent of the following in xslt:
.//TagA[./TagB/[@AttrA='AttrAValue'] = 'TagBValue']
This is failing within Visual Studio 2008 with the following error:
error: Unexpected token '[' in the expression.
.//TagA[./TagB/ -->[<-- @AttrA='AttrAValue'] = 'TagBValue']
Should this be working? Is this a problem in...
I am working on an automated testing app, and am currently in the process of writing a function that compares values between two XML files that should be identical, but may not be. Here is a sample of the XML I'm trying to process:
<?xml version="1.0" encoding="utf-8"?>
<report xmlns="http://www.**.com/**">
<subreport name="RBDRep...
Hi all,
I'm building an XML DOM document in C++. My problem is this: I execute an XPATH query from an Element in my Document, which I know will return another Element. The elementPtr->selectSingleNode call returns an IXMLDOMNode. How can I gain access to the attributes of this node?
Part of me wants to downcast the Node to an Element,...
Can I use Xpath node set function position() in Delphi's function selectNodes() to select only a certain number of element from a node list? If I do like this:
selectNodes('Item[1]')
its all fine and I get the element with index 1, but when I try
selectNodes('Item[position()<10]')
I get exception 'unknown method', when I try
se...
I created following simple xml (C escape sequence used) "<A>\n</A>"
When MSXML (v4 and v6) serialize DOM document using IXMLDOMDocument2.xml it changes newline to dos format and returns: "<A>\r\n</A>" instead.
When I use DOM to retrieve only string node inside element I get correct single character ("\n") string.
Of course I have pres...
The code below works. But if I comment out the line "Dim objRequest As MSXML2.XMLHTTP" and uncomment the line "Dim objRequest As Object" it fails with the error message "the parameter is incorrect". Why, and what (if anything) can I do about it?
Public Function GetSessionId(strApiId, strUserName, strPassword) As String
Dim strPostData ...
All,
this is my code
//declare string pointer
BSTR markup;
//initialize markup to some well formed XML <-
//declare and initialize XML Document
MSXML2::IXMLDOMDocument2Ptr pXMLDoc;
HRESULT hr;
hr = pXMLDoc.CreateInstance(__uuidof(MSXML2::DOMDocument40));
pXMLDoc->async = VARIANT_FALSE;
pXMLDoc->validateOnParse = VARIANT_TRUE;
pXMLDoc...
I have a multithreaded server C++ program that uses MSXML6 and continuously parses XML messages, then applies a prepared XSLT transform to produce text. I am running this on a server with 4 CPUs. Each thread is completely independent and uses its own transform object. There is no sharing of any COM objects among the threads.
This works ...
I have an xml string
<grandparent>
<parent>
<child>dave</child>
<child>laurie</child>
<child>gabrielle</child>
</parent>
</grandparrent>
What I want to get is the data raw xml that's inside the parent.
I'm using MSXML
iXMLElm->get_xml(&bStr);
is returning
<parent>
<child>dave</child>
<child>laur...
We have a part of our application where our users can create objects containing html, javascript and css through custom made Wysiwyg components. Those objects are at some point serialized and later deserialized. However, since our users/clients are located all over the globe, they sometimes input characters that cause grievance during de...
I'm working on two websites. One is an existing classic asp site which posts xml to a new asp.net (.net 3.5) website. The classic asp site is using msxml's serverxmlhttp object in vbscript to send this xml over. The whole thing works until I make a seemingly unrelated change to the asp.net site.
When I add a few lines of code that us...
Hi,
I'm trying to validate an XML file against the schema's it references. (Using Delphi and MSXML2_TLB.) The (relevant part of the) code looks something like this:
procedure TfrmMain.ValidateXMLFile;
var
xml: IXMLDOMDocument2;
err: IXMLDOMParseError;
schemas: IXMLDOMSchemaCollection;
begin
xml := ComsDOMDocument.Crea...
It is not really a question because I have already found a solution. It took me a lot of time, that's why I want to explain it here.
Msxml is based on COM so it is not really easy to use in C++ even when you have helpful classes to deal with memory allocation issues. But writing a new XML parser would be much more difficult so I wanted ...
I understand that the name of selectNode/selectSingleNode methods actually suggests that they are designed to return a node, however maybe there is some other way or a setting available to enable XPath evaluator to return data of other types (that are also valid XPath results)
oDocument.selectSingleNode("'1'");
throws an error "Expr...
I have a simple XML with a CDATA section like:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<config>
<input>
<![CDATA[
line
another line
and another
]]>
</input>
...
</config>
And I have the current code for parsing the CDATA section using MSXML.
for (int i = 0, count = pChildNodes->Getlength(); i < count; ++i) {
...