|
For some reason the <cd> titles etc aren't copying. If you could just type http://www.w3schools.com/xml/cd_catalog.xml into your browser you will see what code I am on about. I copy it into notepad, save it as a .html file, but when I try opening it up in IE, the XML files aren't rendered, there's no red + and - symbols like there should be?
|
|
|
|
|
Hi R0ssini,
Read the following article to get a good hand on your xml basics. This handbook is meant for novice xml programmers.
I am sure this will help you clear the basics to some extent. If you have any further queries, do email us. We shall get back to you with solution.
regards,
Itech
Itech Consulting
www.itechconsulting.co.in
|
|
|
|
|
Hi R0ssini,
Forgot to post you the link in our earlier mail. Its -
www.codeproject.com/useritems/XML_Basics.asp
regards,
Itech Consulting
Itech Consulting
www.itechconsulting.co.in
|
|
|
|
|
I have studied my own way to an advanced degree in computer science and taught a number of programming courses along the way. I would love to help...
Go to class on the days that it is taught, engage your professor during office hours and ask for assitance from him. Study the lecture material and ask for clarifications in class. Do your homework when it is assigned to the best of your ability. Don't take classes you have no business taking and hope you can beg your way to a good grade on the Internet.
CodeProject is not a site to come to to get professionals to do your school work for you.
There is a part of the assignment that you may want to reread: "YOU are required to demonstrate YOUR understanding." I'd do this for you, but I already passed all my classes.
-- modified at 20:59 Thursday 12th January, 2006
|
|
|
|
|
What's the point of this messageboard existing if you can't ask for help? Don't you have a go at me, I attend all the lectures and have read all the notes, looked at websites and have even taken a book from the library but i'm still struggling. Luckily a helpful guy above has assisted me and now i'm alright. If you're not posting to help me out, don't bother posting to me at all!
|
|
|
|
|
Hi Friends,
I am developing a web application using C#.net and using xml as a database.
I am using xml Schema for all my xml files.
NO I want to export data from those xml files to excel sheet to create reports.
For that I create xml stylesheets means .xslt files.
and Using XsltTransform I am exporting data from xml files to excel sheets.
Now the problem is if my xml files r bound with schemas this idea is not working.
I have to remove schema attribute from the root node of the xml file. and if I am doing this then there is no mean to using schema.
Is there any way to use xslt file with the xml file which is bound with xml schema?
If any one of u have any idea regarding this, plz let me know.
Thank u all in advance.
Chetan Ranpariya.
|
|
|
|
|
How can I do this? I simply want to add the "im" field (which is in the XML file) at the end of the path of the new Bitmap line of code, so that the correct jpg is shown. I've created filestreams and everything works fine for the the text fields. The images are located in the "Program Files\SmartDeviceApplication1" directory, as is the XML file. If I type in the actual name of an image, it works, but of course the image is shown for every entry. (So I know the directory path is correct) Right now I'm getting "cannot convert string to System.Drawing.Image"
In the simplest sense, I want to do this:
\\Program Files\\SmartDeviceApplication1\\<im>
so that it reads:
\\Program Files\\SmartDeviceApplication1\\kopf_ap.jpg
Any help is appreciated! Martina
Snippet XML file:
<im>>kopf_ap.jpg</im>
Snippet Code (C#)
<br />
<br />
picbox.DataBindings.Add("Image",dt,"im");<br />
<br />
Bitmap bmp= new Bitmap("\\Program Files\\SmartDeviceApplication1\\");<br />
<br />
this.picbox.Image = bmp +"im";
|
|
|
|
|
Maybe you need to do this?
picbox.DataBindings.Add("Image",dt,"im");
Bitmap bmp= new Bitmap("\\Program Files\\SmartDeviceApplication1\\" + im);
this.picbox.Image = bmp;
|
|
|
|
|
Thank you, I had tried that, but it didn't seem to work.
I ended up doing this:
string root = "\\Program Files\\SmartDeviceApplication1\\";<br />
DataRowView drv = (DataRowView)ca_id.SelectedItem;<br />
<br />
ca_bildurl.Image = new Bitmap(System.IO.Path.Combine(root,drv.Row["im"].ToString()));
I now have another problem - the SelectedItem doesn't seem to work, but at least the first image is being shown. Thanks for your reply, though!
|
|
|
|
|
Hai,
I have grouped the paragraph styles of same type using the following method.
<!-- match paragraph nodes that are part of a Bullet list -->
<xsl:template match="w:p" mode="insideBulletList">
<!-- output this bullet item paragraph -->
<li><xsl:apply-templates /></li>
<!--go to next one-->
<xsl:apply-templates
select="following-sibling::*[1][self::w:p/w:pPr/w:pStyle[@w:val='BulletList']]"
mode="insideBulletList" />
</xsl:template>
My Wordml contains the following paragraph styles
w:p[w:pPr/w:pStyle[@w:val="para1"]
w:p[w:pPr/w:pStyle[@w:val="para2"]
w:p[w:pPr/w:pStyle[@w:val="para3"]
I want to group the above 3 different styles under one parent node like
<newnode>
<para1>38293</para1>
<para2>sdjfkj</para2>
<para3>eiruwio</para3>
</newnode>
I brought the above output using <xsl:for-each select="*" group-starting-with=""> method. But I want the above output using <xsl:template match> method so that it will maintain the position.
anybody help me!!!!!!!!!
|
|
|
|
|
Input XML:
---------
<artbody>
<section id="s1">
<heading1 level="1">INTRODUCTION</heading1>
<para>xxx <b>xxx</b> xxxxxxxxxxxxxxxxxxx</para>
<subsect id="s1-1">
<heading2 level="2">Linkends</heading2>
<para>This paragraph contains fixed figure <fx1>, <fx2>, <fx3>.</para>
<para>This paragraph contains linkend type for Bibliography (numbered) (type=bib): [<link type="bib" linkend="">3</link>], [<link type="bib" linkend="">4, 7</link>], [<link type="bib" linkend="">7–12</link>], [<link type="bib" linkend="">14-18</link>], [<link type="bib" linkend="">3, 5, 7–12</link>] and [<link type="bib" linkend="">6, 8, 15-17</link>].</para></subsect1>
<subsect1 id="s1-5-1">
<heading3 level="3">Question and Answer</heading3>
<quest>What's you name?</quest>
<answer>Pradeep</answer>
<quest>How old are you?</quest>
<answer>62</answer>
<quest>So, what are you doing now?</quest>
<answer>Just chatting with an idiot</answer> </subsect>
</subsect>
<subsect1 id="s1-5-1">
<heading3 level="3">poem</heading3>
<stanza></b>What's you name?<b></stanza>
<stanza></b>Pradeep<b></stanza>
</subsect>
<para>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</para>
<para>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</para>
</section>
</artbody>
Style Sheet:
-----------
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns ="urn:schemas-microsoft-com:office:office"
exclude-result-prefixes="aml w wx o v">
<xsl:output method="xml"
indent="yes"
omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="*">
<xsl:choose>
<xsl:when test="artbody">
<xsl:copy>
<xsl:for-each-group select="child::node()" group-adjacent="self::quest or self::answer">
<xsl:choose>
<xsl:when test="current-grouping-key()">
<b> <quanta></b>
<xsl:apply-templates select="current-group()"/>
</quanta>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="current-group()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each-group>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Questions:
---------
1. I would like to group 'quest' & 'answer' under 'qanda'
2. I would like to group 'stanza' under 'poem'
I want to read each element dynamically and should group the orphan nodes such as quest & stanza under another parent element. But, with your suggestion, I could group one at a time. I couldn't do it in a loop. When I tried, I am getting duplicate of orphan nodes and all the attribute values are discarded.
If you could help us to design a xslt that groups "quest & answer" and "stanza" dynamically and retains all other elements untouched.
I sincerely appreciate your help in this regard.
Thanks & Regards,
-Rocxy
|
|
|
|
|
Sorry, very stupid question, but.... how do I specify paths in XML?
In other words, I want to specify a "root directory" for image files.
Thanks!
|
|
|
|
|
Could you use something like the base tag in XHTML?
|
|
|
|
|
Hi Friends,
In my application I am using XML as database and my application is web based applicaton.
I want the user to be able to export data in xml file to a excel sheet.
I tried with various codes and samples but no one worked.
If any one have some thing ragarding this problem plz let me know.
Thank u all in advance.
Chetan Ranpariya.
|
|
|
|
|
I have the following XML
-----------------------------------
<fname>aaaaa</fname>
<surname>xxxx</surname>
<fname>bbbbb</fname>
<surname>yyyyy</surname>
<fname>ccccc</fname>
<surname>zzzzz</surname>
-----------------------------------
I want the following output
-----------------------------------
<authorgrp>
<author>
<fname>aaaaa</fname>
<surname>xxxx</surname>
</author>
<author>
<fname>bbbbb</fname>
<surname>yyyyy</surname>
</author>
<author>
<fname>bbbbb</fname>
<surname>yyyyy</surname>
</author>
</authorgrp>
------------------------------
Anyone can help??????????????????
-- modified at 1:59 Thursday 29th December, 2005
|
|
|
|
|
Try this...
<xsl:template match="/">
<authorgrp>
<xsl:for-each select="fname">
<author>
<fname><xsl:value-of select="."/></fname>
<surname><xsl:value-of select="../surname[position()]"/></surname>
</author>
</xsl:for-each>
</authorgrp>
</xsl:template> I haven't tested it, but it should get you close.
Michael Flanakin
Web Log
-- modified at 9:55 Thursday 29th December, 2005
|
|
|
|
|
I want to store an xml file in sqlserver using asp
xml file should be used as an input paramenter for a stored procedure
suneel
|
|
|
|
|
I want function in one namespace to create instance of class defined in
another namespace.
(more detailed - I try to make independent "Seralizer" dll, to be used
by different application, each calling it from its own class which
defines the application configuration)
I failed to make it work.
Notify that in the Seralizer source I dont know the definition of the
class I get.
Foe example, how do I make lines like below working?
public void Deserialize(Type cfgType)
{
myType obj = Activator.CreateInstance(cfgType);
XmlSerializer serializer = new XmlSerializer( cfgType);
FileStream stream = new FileStream("some file...", FileMode.Open,
FileAccess.Read);
cfgType configuration = (cfgType)serializer.Deserialize(stream);
}
thanks
Michael Lev (mlev)
|
|
|
|
|
hello
I am making DOm msxml parser .
My current compiler in visual C++ 6
but it crashes while loading xml file in loadxml() method.
if any one know how to overcome this error kindly help me ?:->
mast
|
|
|
|
|
How can i get the value in an xml file when i specify the name in the xml file..Please provide me the code to do this in C#.NET..
Thanks..
|
|
|
|
|
I'm studying computer science and I'm in 400 level. I have a project to be submitted in 3month time and I should get the review and some of the designs ready for January. My project is to design a Software Like you cvtmovie but this time around it would convert any movie compres it and probably keep it in an archive untill its demanded for. This should aid the applications of large video user to be able to keep voluminuous video. I can cope with any prog language if i understand the problem being defined. I need to start from somewhere but I dont know how.
God Bless
|
|
|
|
|
I have an xml file which contains schedules for all employees. How do I extract data from this file for a specific employee? Below is a snippet of the code, but this loads all employees.
DataSet allSchedulesDs = new DataSet();
// get schedules
allSchedulesDs.ReadXml(myFilepath + "AllSchedules.xml");
scheduleCount = allSchedulesDs.Tables["ALLSCHEDULES"].Rows.Count - 1;
for (int j = 0; j <= scheduleCount; j++)
{
// check all xml file for badge number input
if ((string)allSchedulesDs.Tables["ALLSCHEDULES"].Rows[j][0] == textBoxBadgeId.Text.PadLeft(5, '0'))
// record found set up for display
{
// this gets all schedules need to limit display to just this badge number
scheduleList.DataSource = allSchedulesDs.Tables["ALLSCHEDULES"].DefaultView;
scheduleList.DataBind();
}
}
|
|
|
|
|
Hi everyone,
I first would like to warn you that I'm a newbie programmer. So if I have left out important code for you guys to determine what I'm doing wrong, let me know.
I am making a PocketPC application using C# and an XML file as a database. I would like to display the corresponding JPG image in a PictureBox, or somewhere on the main page.
A sample of my xml file. The bolded line is the picture reference.
<fragenkatalog><br />
<ca_id>4</ca_id><br />
<ca_titel>head ap</ca_titel><br />
<ca_bildurl1>kopf_ap.jpg</ca_bildurl1><br />
<ca_disabled>0</ca_disabled><br />
<ca_alter>999</ca_alter><br />
<ca_sex>n</ca_sex><br />
</fragenkatalog>
This is what I have, which doesn't work.
<br />
ca_bildurl.DataBindings.Add("Image",dt,"ca_bildurl1");
The ID is chosen from a ListBox, and the corresponding data is displayed on the screen.
Any help would be appreciated! Thanks!
M.
-- modified at 21:09 Friday 30th December, 2005
|
|
|
|
|
Please repost your XML with < and > instead of the < and > symbols.
Michael Flanakin
Web Log
|
|
|
|
|
Ok, it's changed. Sorry about that.
|
|
|
|