|
XPath is, in essence, an XML search engine. It shouldn't be too hard to write an XSLT that searches for a parameterised word and returns a result.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I am sorry I did not respond to you sooner. I am just a bigger when it comes to XML. Have you got a small sample.
|
|
|
|
|
I want convert managed C++ System.String type to C style, char, tchar, _bstr types. How can i conver to un managed c++ types.
Please help..
Murali.
|
|
|
|
|
Are you using the string to store XML ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Can anybody help me??? please
I have 2 xml files. One of them is a subtree of another one. I need to find node in first document that is parent for second xml. I need it for additional processing using MSXML DOM and that's why I can't use string search. Second xml may has attributes and childs at different level.
My first idea was to create XPath by processing XML DOM structure of second xml, but it turned out, that it is not so easy.
Thanks
|
|
|
|
|
hii can anyone give me an example of how to import xml file and then insert the element of that xml file to microsoft access table
|
|
|
|
|
does anyone know of a website where you can upload your vxml files and run your application software? so that users can call the server and add things based on the vxml. i know bevocal.com is a test site, but i havent found any pay sites to run my website.
|
|
|
|
|
Dear CPians,
I am trying to have a & n b s p ; in an XSL file. Is there a way to do it
Thank you!
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
If you want to put the into an output document (such as HTML) as-is, you could try this:
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
or you could put the following at the top of your XSL file and then use entity in your satylesheet.
<!DOCTYPE stylesheet [
<!ENTITY nbsp " ">
]>
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
Thank you very much...;P
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
If built up a TCP/IP communication between two PC´s via a socket connection. The client is sending XML Data to the Server. I´m writing this Data to a buffer at the moment. The Server is supposed two answer by sending XML Data back.
I need specific Information from the Data sent by the client. I´m trying to find out, how to do that.
I thought, it might be the easiest way to use Serialization. But therefore i need to convert the data in the buffer to a Filestream. And i don´t want to save the Data to the HardDrive first before extracting information.
I´m using C++ & MS VS .Net 2003.
Is this conversation possible?
Do you think that this is the appropriate way to do it, or are there other ways to get to the XML Data i need.
I must say that i´m not a experienced c++ programmer. Please keep that in mind when answering!!
Thanks for the help!!
|
|
|
|
|
Try using MemoryStream - the code should be similar to the stuff below
<br />
using System.Xml;<br />
using System.IO;<br />
<br />
byte[] byteArray = ipSocket.getBytes(numBytes);
MemoryStream memStream = new MemoryStream(100);<br />
memStream.Write(byteArray,0,byteArray.Length);<br />
XmlTextReader reader = new XmlTextReader(stream);<br />
Then do whatever you need to do with the stream contents as XML, Validate, transform, etc.
To put XML data back on the socket,
<br />
MemoryStream memWriteStream = new MemoryStream(100);<br />
XmlTextWriter writer = new XmlTextWriter(memWriteStream,null);<br />
byte[] memBuffer = memWriteStream.GetBuffer();
int nResult = ipSocket.WriteBytes(memBuffer);
Hope this helps
aacool
Aaman Lamba
|
|
|
|
|
Hi
I can't figure out how to send XML requests to a server and get a XML response. I'm looking at XML-RPC but I'm not sure if it is right. I don't want to send procedure-calls.
If somebody knows a class in C++ that can do it easily - I'm probably just missing the connecting link (so to speek)
Any help would be appreciated - thank you
Simon
|
|
|
|
|
I'm not sure about C++ but in managed code it would be fairly easy to do using classes provided in System.Net namespace.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Does anyone know where I can find a xslt file to transform xml into html or how to open a new browser window from asp.net to display the xml. I have a string that contains the xml that is generated from an object. I want to display the xml to the user in the browser. The format can change so writing a custom xsl is time consuming. I just want to display the xml as would be done if you open up an xml file in the web browser. However, must of the xsl files that exist on a windows pc for doing this are specifically designed to be run by the browser and don't use the standard schema that is required by XslTransform. I want the data to be displayed in a nicely color and formated XML format. If anyone has any help for me on this it would be greatly appreciated.
|
|
|
|
|
Adam Gritt wrote:
Does anyone know where I can find a xslt file to transform xml into html
In every book on xslt, and probably every website. It's a very obvious and typical use. There's no such thing as a generic transform though, it needs to be written to match the schema of your xml, and the format of the desired output.
If you just want to show the XML, you just need to htmlencode it. What language are you using ? C# certainly provides a method to do this, if you're using asp.net.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi folks...
I apologize for reposting but some code was trimmed in the previous post...
<xsl:choose>
<xsl:when test="./test[1]/@result != 'failed'">
<xsl:otherwise>
<xsl:value-of select="@name">
I need to change the color of tr to red when @result attribute contains "failed". When i executed above snippet i got the following error.
"End tag 'xsl:when' doesn't match the start tag 'tr'"??
Any workarounds ??
Thanks in advance...
Regards,
Hatim Ali.
|
|
|
|
|
hi
you need to close the first element using
|
|
|
|
|
hi folks...
<br />
<xsl:choose><br />
<xsl:when test="./test[1]/@result != 'failed'"><br />
<tr style="color:green; font-family:verdana; font-size:12 px;"><br />
</xsl:when><br />
<xsl:otherwise><br />
<tr style="color:red; font-family:verdana; font-size:12 px;"><br />
</xsl:otherwise><br />
</xsl:choose><br />
<td width="60%" style="border:gray 1px solid;"><br />
<xsl:value-of select="@name"/><br />
</td><br />
</tr><br />
I need to change the color of tr to red when @result attribute contains "failed". When i executed above snippet i got the following error.
"End tag 'xsl:when' doesn't match the start tag 'tr'"??
Any workarounds ??
Thanks in advance...
Regards,
Hatim Ali.
|
|
|
|
|
Well, you've not posted your xslt, but the problem is exactly as the message says, and the work around is to make your html valid xml. You have two tr starting elements, and only one is being closed.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Try something like this giving condition in this way dont know what is there in ur xsl, but this might work if there is only 1 condition
<xsl:if test="age > 40">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:if>
or try with choose
<td><xsl:value-of select="title"/></td>
<xsl:choose>
<xsl:when test="age > 10">
<td bgcolor="#ff00ff">
<xsl:value-of select="artist"/></td>
</xsl:when>
<xsl:otherwise>
<td><xsl:value-of select="artist"/></td>
</xsl:otherwise>
</xsl:choose>
here age artist title etc are tags of XML
try this out!
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
Need some problems with character entities again.I am using msxml3 DOM API
Basicly I have to perform 3 steps:
1.Read some text, create and add it to a node
<nodetext> This is a test </nodetext>
2. Add a character entitie to that node
<nodetext> This is a test &en_test; </nodetext>
3. Add some text to that node later in my code.
<nodetext> This is a test &en_test; New Text </nodetext>
I am having difficulties with the 3rd step. I am using the createEntityReference method to add the entities but how do I add more text to the node and preserve the format of the entity. I need this to work badly.Someone please give me a hint ?!
|
|
|
|
|
I am using msxml DOM API to create XML documents and I need to insert character entities like
& #013; and etc If it I tried everything but it just wont work. Can someone help me on this subject please ?
|
|
|
|
|
I got it a simple \x0D did the job, RTFM as people say ;]
|
|
|
|
|
I tring to pass a XmlElement(DataSet) to a xml web service
How can I write in asp.net C# to write this XmlElement
<School>
<Student>
<NameFirst>Bill</Name>
<NameSecond>Evans</NameSecond>
</Student>
<Student>
<NameFirst>Tom</Name>
<NameSecond>Evans</NameSecond>
</Student>
<School>
|
|
|
|