|
How can I fullfil the xml information for a enumerated type?
CODE_________________________________________________
public enum SegmentationTypes {SingleFrame = 1, FixedSize = 2, BottumUp = 3, Cumulation = 4, ShotDetection= 5, MedianIncremental = 6, Filtering = 7};
END CODE______________________________________________
When I insert the "///" I just get the summary field, and during compilin I get an error: "Missing XML comment for publicly visible type or member SegmentationTypes.SingleFrame" for every type in my enumerated type
Some suggestions?
|
|
|
|
|
Try:
public enum MyEnum
{
Value1,
Value2,
...
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Hi all,
I have very newbie question concerning VB.NET and XML.
I have an Xml file like this (simplified):
<personnel>
<person>
<person_id>123</person_id>
<name>John Doe</name>
</person>
...
<person>
<person_id>890</person_id>
<name>Mary Somebody</name>
</person>
</personnel>
I can extract info from it but I don't know how to update it? Eg. Mary Somebody gets married and her name will be Mary Doe.
I will be most grateful any advice or links to info.
TIA
Lasse Rantanen
lasse.rantanen@jopiarvio.fi
|
|
|
|
|
in c#...
using System.Xml;<br />
<br />
.<br />
.<br />
.<br />
<br />
<br />
XmlDocument personnel = new XmlDocument();<br />
personnel.Load(filename);<br />
<br />
XmlElement marysName = null;<br />
marysName = personnel.SelectSingleNode("//person[person_id/text() = '890']/name");<br />
marysName.innerText = "Mary Doe";<br />
<br />
personnel.Save(filename);
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Thanks,
I have noticed that I usually get stuck with things which have rather simple solution.
|
|
|
|
|
Often things are not simple nor obvious until you figure them out. Most of this is not too intuitive.
Cheers.
|
|
|
|
|
hello,
i have a xml file, starting with , then xml data, and a xsl file, starting with:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:preserve-space elements="reporttext">
<xsl:template match="/">
and a meta tag included in side the :
.
now i transform the data via transformnode and the resulting html file contains 2 meta tags inside the :
and the page is not displayed properly. some italian characters are displayed as japanese letters. if i manually remove the UTF-16 meta tag from the html file, the page is displayed correctly.
where does this UTF-16 meta tag comes from? and what can i do about it?
many thanks
enrico
|
|
|
|
|
particle2k wrote:
some italian characters are displayed as japanese letters.
UTF-16 means that each character is 2 bytes. This is helpful for languages which have more than 255 characters. For other languages, UTF-8 should be used (1 byte, or 8 bits, per character).
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
this is happening because of the way you are specifying the transformation.
the code is guessing that you want UTF-16.
check your <xsl:output encoding=""/>
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
I made an XML report, but the problem is that some of the report viewers are using non-IE browsers, which usually don't understand XML. Is there a way to pre-parse/transform XML into HTML? There must be, because the XML is turned into HTML before being displayed in the browser.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
If you write an XSLT style sheet you can use the MSXML (or most other) DOM to perform the transformation for you using DOMDocument::transformNode method...
|
|
|
|
|
Open the XML doc in Internet Explorer. Select-all, then copy. Open up Frontpage, then paste. Simple, huh?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I have the following in my XML file :
<field name="collection">EXTRA BUSINEXX PLC
<field name="ric">GB;RTR
I have the follwing XSLT, to print only the contents of FIELD where NAME="ric"
<xsl:for-each select="FIELD">
<xsl:if test="@NAME='ric'>
<xsl:value-of select=" ."="">
But it doesn't work... obvoisuly in the if command!
Mark
|
|
|
|
|
put the condition in your for:
<xsl:for-each select="FIELD[@NAME = 'ric']">
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
I have the following in my XML file
<field name="collection">body
<field name="pfi">BGR9965
<field name="documenttype">BGR
I want to loop through the FIELD id's and only print the 'value' if NAME="pfi".
The XSLT I have (which doesn't work is....)
<xsl:for-each select="FIELD">
<xsl:if test="@NAME='pfi'">
<xsl:value-of select=".">
I'd love any help! Cheers
Mark
|
|
|
|
|
I am trying to write a simple program that loads an xml file but i can not link this program, I am following this tutorial
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/dom_hdi_30dv.asp
Could any body help?
#include <stdio.h>
#include <msxml2.h>
#include <windows.h>
#pragma comment(lib,"msxml2.lib")
int main()
{
HRESULT hr;
IXMLDOMDocument3 *pXMLDoc = NULL;
IXMLDOMParseError * pObjError = NULL;
BSTR bstr = NULL;
VARIANT_BOOL status;
VARIANT var;
CoInitialize(NULL);
hr = CoCreateInstance(CLSID_DOMDocument40,
NULL,
CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument3,
(void**)&pXMLDoc);
return 0;
}
|
|
|
|
|
Did you install the MSXML 4 SDK ? (see MS platform SDK site for the update).
Once installed, you still need to add the path to the msxml2.lib file in either your project settings (additional library path), or your VisualStudio general directories (tools / options / directories).
|
|
|
|
|
Hi.
I have data in XML format and I use XslTransform.Transform to transform the data to a presentable form with an xsl-file. At one location I have used for instance
<xsl:apply-templates select="//TermR[termid=$intd]"/> to select what TermR data to use, where $intd is some variable. If I want to use two conditions, for example I only want to use TermR data where termid=$intd AND term2=$intp , is this possible? How do I write the selection in my xsl-code?
Thanks
/EnkelIk
|
|
|
|
|
You should be able to use it just like that:
<xsl:if test="termid=$intd AND term2=$intp">
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Thanks. Why did I not think of the simplest solution? For the select case the following turned out to work:
<xsl:apply-templates select="//TermR[termid=$intd][term2=$intp]"/>
i.e. just adding up the conditions.
/EnkelIk
|
|
|
|
|
XSL
I'm making some output be bold only if a certain condition is true:
<xsl:if test="test"><b></xsl:if>
Now the problem is, all end tags must directly match up with their start tags (i.e. you can't do "<b><i></b></i>" - you have to do "<b><i></i></b><i></i>"). But I'm wanting the "<b>" tag only to be outputted only if the test condition is true. Short of having seperate block for each combination of <b>, <i>, <u>, etc, how do I do it?
I've thought of using script to concatenate a <b>:
function GetTag(text)
GetTag=Chr(60) + text + Chr(62)
end function
Or can someone show me a better way?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
The 'politically correct' way is probably to use the xsl:element tag e.g.
<xsl:choose>
<xsl:when test="test">
<xsl:element name="b">
Your Content
</xsl:element>
</xsl:when>
<xsl:otherwise>
Your Content
</xsl:otherwise>
</xsl:choose>
This is easy enough if your content is in another rule or a function or something - not so easy otherwise...but it does make sure you've got all tags paired correctly.
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
Stuart Dootson wrote:
to use the xsl:element tag
Now why didn't I remember that one! THANKS!!!
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
And also remember xsl:attribute when you need to add attributes to elements
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
Yep. You can bet I immediately looked up <xsl:element> and its related tags on MSDN as soon as I saw this! Thanks again!
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|