|
Hi..
I am new to XML.NET Parser...So can anyone help me in providing some good links for XML .NET Parser so that i can load an xml file and validate it with xsd file in VC++..
Kindly provide the links or any advices regarding this..Plz don't tell me to search in Google..I had searched alot..So whoever familiar with XML .NET Parser,plz help me..
Thanks..
|
|
|
|
|
|
|
I have a project, in which we need to read in an XML file. But, when we read in that file, we need to parse it so that only designated data is used. So we parsed it into a string. We now are running into the difficulty of passing the String into the XSLT.
Is there a way to convert a String with XSLT, or do we need to rewrite the XML file?
TIA,
Scott
|
|
|
|
|
You can load the tring into an XMLDocument object much like you load it from file.
HRESULT loadXML(BSTR bstrXML,VARIANT_BOOL * isSuccessful);
This migth be an Microsoft extension of the DOM model, but it exists in
MSXML.
Then it is possible to transform it using the transformNode method of the XMLDocument object.
HRESULT transformNode(IXMLDOMNode *stylesheet, BSTR *xmlString);
/Per
|
|
|
|
|
What language/technology are you using?
Michael Flanakin
Web Log
|
|
|
|
|
Hi
i have an webpage which at the time of loading populates a table. the user can also populate the table by clicking on a button. There is a column called seqno which is populated in "space-SeqNo-space" fashion at the time of loading time population. Same thing when trying to accomplish through javascript it is seen that xsl loading time space is not identical with javascript space.
for example:
XSL:
" 1 "
" 2 " etc.
Javascript:
" 1 "
" 2 "
(here in example to show the effect i am using two space for javascript)
seeming an indentation problem.
My resolution is 1152 X 864.
Another thing for same color-code from javascript and from xsl it shows different color.
Thanks in advance
Chiranjib
|
|
|
|
|
Make sure you escape your '&' characters. I can't see your XSL output, but I'm guessing the problem is that you're using   , which is the equivalent of (a non-breaking space) in HTML. Try modifying the JavaScript to either parse   and as well as spaces or simply replace all occurrences of   and with a space.
xslOutput = xslOutput.replace(' ', ' ');
xslOutput = xslOutput.replace(' ', ' '); That should work... assuming I've guessed the problem correctly.
Michael Flanakin
Web Log
|
|
|
|
|
IXLMDOMDocument2Ptr pDoc;
// test.xml (UTF-8) encoded, :
//<?xml version='1.0'?><root>你好, hello</root>
// check in IE, no problem.
// resource type HTML, or BINARY tried.
// ... create pDoc, find resource, loadresouce,
// create IStream on HGlobal, everything seems ok
// and i checked the dubug info, show xml content correctly,
// and setting the IStream to the beginning of IStream
// but...
pDoc->async = VARIANT_FALSE;
pDoc->load(_variant_t(pStream)); // FAILs, it complains that no top level element in xml.
// but, when i write the stream into a disk file,
// and load form file, it's OK !!!
// if use loadXML((LPTSTR)hGlobal) the charactor shown is not correct.
|
|
|
|
|
It should not be much of a problem. I do it like this in a project (With all error handling removed. It just clutters up the example.)
int CHookApp::LoadXML (int rsrc, MSXML2::IXMLDOMDocument2Ptr& xml, CString& errMsg)
{
HRSRC hXSLResourceInfoBlock;
HGLOBAL hXSLResource;<br>
hXSLResourceInfoBlock = ::FindResource (m_hInstance, MAKEINTRESOURCE(rsrc), "XSL");<br>
if (hXSLResourceInfoBlock)
hXSLResource = LoadResource (m_hInstance, hXSLResourceInfoBlock);<br>
if (hXSLResourceInfoBlock == NULL || hXSLResource == NULL)
return -1;<br>
try {
_bstr_t xmlText ((char*)LockResource (hXSLResource));
if (xml->loadXML ( xmlText ) == VARIANT_FALSE)
return -1;<br>
}
catch (...) {
return -1;<br>
}<br>
return 0;
}
I wonder why my empty lines are removed from the <pre> block above. It remained in another reply of mine.......
-- modified at 5:03 Wednesday 14th December, 2005
|
|
|
|
|
Dear Experts,
I need some information on dynamic updation of XML file.
Our application asks the user to insert a file by giving the user browsing option.
We want our XML file (which contains the information about the residing files) to be dynamically updated as soon user specifies the path of the inserted file.
The next task is to dynamically update the XML file once the user select the file to be deleted by clicking on the Application UI.
We have to develop the code in C++.
Kindly send across your suggestion, opinion and helpful codes.
Regards,
Mayank Srivastava
Regards,
Mayank Srivastava
|
|
|
|
|
This may not belong in this section, but just a try.
How do you convert ByteArray into a Jpeg image?
|
|
|
|
|
byte[] buffer;
System.IO.MemoryStream ms = new System.IO.MemoryStream(buffer);
System.Drawing.Bitmap bm = new Bitmap(ms);
bm.Save("FilePath", System.Drawing.Imaging.ImageFormat.Jpeg);
|
|
|
|
|
Thanks a lot. I am really looking for code that can be implemented in the client [in Javascript].
Much obliged.
mysorian
|
|
|
|
|
Alguien tiene informacion sobre integracion de esquemas para base de datos,(teoria) y alguna aplicacion.
|
|
|
|
|
hi, i don't know how to add diferents rows to the same column, and i would like to know if somebody could tell me.:->
La Light
|
|
|
|
|
Iridania wrote: hi, i don't know how to add diferents rows to the same column, and i would like to know if somebody could tell me
You want to insert Row and Column in what thing ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hi,
Help me anyone please... I want to create a tab control in asp.net application using xml.
baski
|
|
|
|
|
Hi Baskaran,
U can add new tabs and pages to the tabstrip controls by the follwing way.
Following is the way to add one tab to the tabstrip control but by using loop u can add as many tabs as u want to.
TabSeparator Ts = new TabSeparator();
tsVert.Items.Add(Ts);
Tab Tb = new Tab();
Tb.Text = "New Tab";
tsVert.Items.Add(Tb);
Ts = new TabSeparator();
Tx.DefaultStyle = Microsoft.Web.UI.WebControls.CssCollection.FromString("width:100%");
tsVert.Items.Add(Ts);
PageView pg = new PageView();
Label lbl = new Label();
lbl.Text = "Mahesh";
pg.Controls.Add(lbl);
mpVert.Controls.Add(pg);
Thank you.
-- modified at 1:36 Monday 5th December, 2005
|
|
|
|
|
hi ,
Things we have done:
Based on XML we have created one DTD for it.
Now in place holder we have placed details like skuid,full_name,product properties details.
Our requirement:
We have one full image path for every product in XML , we need to display product image for each product.
by the place holder text content dynamically increase according to xml file content .
but we are unable to locate picture dynamically.it shows only the first product picture.
constraints we found:
no dynamic increment of textbox like text
Advance Thanks,
|
|
|
|
|
I'm trying to add mouseOver effects to my xsl transformation.
<a><xsl:value-of select="EnglishName"/></a>
onMouse over
<a><xsl:value-of select="FrenchName"/></a>
any ideas how i can go about doing this ?
thank you
|
|
|
|
|
<a onmouseover="this.innerText = '{FrenchName}';" onmouseout="this.innerText='{EnglishName}';"><xsl:value-of select="EnglishName"/></a>
or
<A>
<xsl:attribute name="onmouseover">
<xsl:value-of select="FrenchName" />
</xsl:attribute>
<xsl:attribute name="onmouseout">
<xsl:value-of select="EnglishName" />
</xsl:attribute>
</A>
-- modified at 8:42 Tuesday 27th December, 2005
|
|
|
|
|
Is there an easy way to transform an xml document to another xml document with all the elements sorted?
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
-- modified at 23:38 Thursday 1st December, 2005
|
|
|
|
|
The xsl:sort element is used to define a sort key. This sort key determines the order in which selected nodes are processed by the xsl:for-each or xsl:apply-templates elements.
Syntax: <xsl:sort
case-order="upper-first" | "lower-first"
data-type="number" "qname" | "text"
lang="language-code"
order="ascending" | " descending"
select="expression"
>
</xsl:sort>
Sushant Mathur
Ocwen Financial Sol. Pvt. Ltd,
Bangalore,
INDIA.
|
|
|
|
|
I understand that I can use xsl to sort the individual elements if I wanted to create the xsl template by hand. I want to take an XML file, perform sorting on it, and export the sorted contents.
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|