Click here to Skip to main content
15,881,882 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionHow to create xmpp client using C#? Pin
manjeeet17-Jun-10 23:13
manjeeet17-Jun-10 23:13 
Answercross-post Pin
Luc Pattyn18-Jun-10 2:27
sitebuilderLuc Pattyn18-Jun-10 2:27 
QuestionError in running ASP.NET C# (MySql) site Pin
Dot-Net-Dev16-Jun-10 17:24
Dot-Net-Dev16-Jun-10 17:24 
QuestionBeginner help to tag Bold text in DocBook v5 for XML export [modified] Pin
keeta116-Jun-10 12:06
keeta116-Jun-10 12:06 
QuestionWrite XSL for this xml i want to convert xml to CSV formt Pin
ksanju100012-Jun-10 9:14
ksanju100012-Jun-10 9:14 
AnswerRe: Write XSL for this xml i want to convert xml to CSV formt Pin
SeMartens15-Jun-10 21:10
SeMartens15-Jun-10 21:10 
Questionwriting to xml file Pin
Farraj8-Jun-10 17:17
Farraj8-Jun-10 17:17 
AnswerRe: writing to xml file Pin
Stuart Dootson9-Jun-10 2:13
professionalStuart Dootson9-Jun-10 2:13 
GeneralRe: writing to xml file Pin
Farraj9-Jun-10 4:39
Farraj9-Jun-10 4:39 
thank you for your reply
im using C#. ive tried building such a file using linq
XDocument doc = XDocument.Load(Server.MapPath(@"file.xml"));


     var temp = (from element in doc.Root.Elements("photo") where element.Attribute("filename").Value == txtBoxFileName.Text && element.Attribute("thumbnail").Value == txtBoxThumbname.Text && element.Attribute("description").Value == txtBoxDesc.Text select element);

          XElement result = null;

          if (temp.Count() == 0)
          {
              result = doc.Root.Elements().Last();
              result.AddAfterSelf(new XElement("photo", new XAttribute("filename", txtBoxFileName.Text), new XAttribute("thumbnail", txtBoxThumbname.Text), new XAttribute("description", txtBoxDesc.Text)));
              result = doc.Root.Elements().Last();
          }
          else
          {
              result = temp.First();
          }


          result.Add(new XElement("photo", new XAttribute("filename", txtBoxFileName.Text), new XAttribute("thumbnail", txtBoxThumbname.Text), new XAttribute("description", txtBoxDesc.Text)));

          doc.Save(Server.MapPath(@"file.xml"));
          this.lblxml.Text = "done";


this cool code was made for searching a specific node and add the data inside it.
it helps. it adds! but, not the way i need it. i only need to add one node of ((< photo a="1" b="2" c="3" / >))
which i think its pretty simple, im just not good enough at it

appreciating any help.

thanks,

Farraj
AnswerRe: writing to xml file Pin
Estys9-Jun-10 5:22
Estys9-Jun-10 5:22 
GeneralRe: writing to xml file Pin
Farraj9-Jun-10 8:42
Farraj9-Jun-10 8:42 
QuestionHow to access xml file simultaneously at runtime Pin
Raghu_M21-May-10 5:12
Raghu_M21-May-10 5:12 
QuestionUsing SAX and PHP Pin
vho12318-May-10 20:22
vho12318-May-10 20:22 
QuestionXSLT and asp.NET mixture Pin
ceviz16-May-10 13:02
ceviz16-May-10 13:02 
AnswerRe: XSLT and asp.NET mixture Pin
Not Active16-May-10 17:08
mentorNot Active16-May-10 17:08 
AnswerRe: XSLT and asp.NET mixture Pin
Atwind27-Jun-10 23:42
Atwind27-Jun-10 23:42 
Questionlanguage localization using XML in VC++ (MFC) Pin
punyah20108-May-10 9:03
punyah20108-May-10 9:03 
QuestionSuppress Xmlns in InnerXML / Rename an XML node in DOM Pin
Ger Hayden6-May-10 11:37
Ger Hayden6-May-10 11:37 
AnswerRe: Suppress Xmlns in InnerXML / Rename an XML node in DOM Pin
Ger Hayden8-May-10 7:24
Ger Hayden8-May-10 7:24 
QuestionParsing RSS Pin
Aljaz1116-May-10 3:37
Aljaz1116-May-10 3:37 
AnswerRe: Parsing RSS Pin
Stuart Dootson6-May-10 23:24
professionalStuart Dootson6-May-10 23:24 
QuestionXSLT to HTML Pin
vho12329-Apr-10 21:46
vho12329-Apr-10 21:46 
AnswerRe: XSLT to HTML Pin
Stuart Dootson6-May-10 1:00
professionalStuart Dootson6-May-10 1:00 
QuestionCan anyone give me a hand with this? Pin
ajweber27-Apr-10 19:20
ajweber27-Apr-10 19:20 
AnswerRe: Can anyone give me a hand with this? Pin
Not Active28-Apr-10 0:54
mentorNot Active28-Apr-10 0:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.