|
hmmm, that looks like SQL problem... how does it go with XML/XSL?
Anyway, if it is SQL, you can do something like
SELECT users.name, friends.idontknowhat FROM users, friends WHERE users.id = friends.iduser
or is it in XML?
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
i have declared two XML objects the first has as datasrc=select * from users and the 2 has select * from users where iduser=@iduser, the problem that i have is that i dont know how to pass the second variable , the iduser from the first xml object, is this posible??
any sugerencies?
thanks
|
|
|
|
|
Can anyone give me a detailed explaination about when to use CSS and XSLFO?
What are the advantages between them. Which is more efficient interms of
maintence.
|
|
|
|
|
|
|
My question is can we serialize an array (array of objects) at a time in .Net. Can anybody annswer me........
Thanx
Pradosh
|
|
|
|
|
Did you try?
As quick look at MSDN shows it (System.Array ) has [Serializable] attribute, so I guess answer is YES.
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Here's my code:
try
{
_strContent = "<Employees><Employee id=\"1\"><Name>Ethan</Name></Employee></Employees>"
_xmlDoc.Load(".\\EMP.xml");
_docFrag = _xmlDoc.CreateDocumentFragment();
_docFrag.InnerXml = _strContent;
_xmlDoc.DocumentElement.AppendChild(_docFrag);
_xmlDoc.Save(".\\EMP.xml");
}
catch(Exception exc)
{
MessageBox.Show(exc.ToString());
}
The EMP.xml is already existing. I just used the above block of code to add new nodes into an existing EMP.xml file. But, I received this exception:
This is an unexpected token. The expected token is 'EndElement'
Unlikely though, the code performs its function. When I check the file, I saw that the node I am trying to add was there, its just that the error keeps on prompting. Will anyone help me? Thanks in advance!
----------------------
Seeing the infinite...
|
|
|
|
|
well I don't know what exactly is problem there, maybe you already solved it (?).
Ethan Marixxe Drater wrote:
This is an unexpected token. The expected token is 'EndEleme
That means syntax error in your XML. Surprisingly.
Ethan Marixxe Drater wrote:
Unlikely though, the code performs its function. When I check the file, I saw that the node I am trying to add was there, its just that the error keeps on prompting.
Strange.
Could you post small examples of input/output? Or at least where exactly exception raises? I mean what statement? _xmlDoc.Load(), _xmlDoc.Save(), AppendChild?
Funny how can be debugging something about 10 lines difficult. I just failed test cuz of the same
David
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Hi David!I was able to fix it. I simply forget to close the node Thanks for the help.
----------------------
Seeing the infinite...
|
|
|
|
|
How could i convert XML file to STRING?
Here's my sample file...
Books.xml
<Books>
<Book>
<Title>Angels and Demons</Title>
<Author>Dan Brown</Author>
</Book>
</Books>
----------------------
Seeing the infinite...
|
|
|
|
|
hmmm. Could you delete your next "posts"? I mean you should MODIFY this one, not to post it again. If you didn't notice, there is magical "modify" link that allows you to edit your post. "delete" is right next to it Thank you.
As for your question... How do you want output to look like? If you have XML file and you want to have string with ALL markup, simple solution is to load it with System.IO.TextReader .
If you want to get only "Dan Brown", you should use classes from System.XmlNamespace . You can use XmlTextReader (similar way as TextReader, bt it reads XML nodes not characters or lines like TextReader) or XmlDocument (easy - it has Load(filename) method). To get "Dan Brown" text, you have to read <Author> element - with XmlTextReader use
this link cuz I just realized that I have lot of work now... sorry[^]
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Hi David, thanks for your help, I think i'll prefer the use of TextReader.
----------------------
Seeing the infinite...
|
|
|
|
|
I am not a C# person nor am I a XML person.
But I have enough skills I can fake it. Could you suggest a C# book that has a basic
1. Read an XML file
2. Determine that it is well formated.
3. Validate the scheme.
4. Write the result.
thanks
|
|
|
|
|
Your first visit should be www.w3c.org for items 2 and 3,
for 1 and 4 ado.net
|
|
|
|
|
hello ,
I have a problem in retreiving the innerXml values from an XML File . The File is pasted below and the method I use is also listed below .
I want to list out the values Sylesh1,Sylesh2,sylesh3........ sylesh9 to an
arrayList .
The Method I use is... below but somehow I cannot retirve the values under the Path. Please point out my errors ?
XmlDocument _Document = new XmlDocument ();
_Document.Load (FileName);
XmlElement _Root = _Document.DocumentElement ;
XmlNodeList _NodeList = _Document.GetElementsByTagName
("configuration/userNames/sylesh/add/listGridCustomizations/myListGrid");
if (_NodeList.Count > 0)
{
foreach (XmlNode _Node in _NodeList)
{
List.Add(_Node.Attributes.GetNamedItem ("value").InnerText);
}
}
Any help ? suggestions ?
or if I'm wrong please point out ?
thanks Sylesh
<configuration>
<configsections>
<sectiongroup name="userNames">
<sectiongroup name="sylesh">
<sectiongroup name="listGridCustomizations">
<usernames>
<sylesh>
<add key="IsCustomized" value="false">
<listgridcustomizations><mylistgrid>
<add key="Column0" value="Sylesh0">
<add key="Column1" value="Sylesh1">
<add key="Column2" value="Sylesh2">
<add key="Column3" value="Sylesh3">
<add key="Column4" value="Sylesh4">
<add key="Column5" value="Sylesh5">
<add key="Column6" value="Sylesh6">
<add key="Column7" value="Sylesh7">
<add key="Column8" value="Sylesh8">
<add key="Column9" value="Sylesh9">
<listgridcustomizations><wrwerwer>
<add key="Column0" value="Sylesh0">
<add key="Column1" value="Sylesh1">
<add key="Column2" value="Sylesh2">
<add key="Column3" value="Sylesh3">
<add key="Column4" value="Sylesh4">
<add key="Column5" value="Sylesh5">
<add key="Column6" value="Sylesh6">
<add key="Column7" value="Sylesh7">
<add key="Column8" value="Sylesh8">
<add key="Column9" value="Sylesh9">
Thanks
Sylesh
Sylesh
|
|
|
|
|
hi,
first could you please edit your post and check "Do not thread <'s as HTML tags"?
Sylesh wrote:
but somehow I cannot retirve the values under the Path.
Does it mean you get empty NodeList? According to MSDN docs[^] you don't have to (or maybe you CAN'T) include whole path as argument.
Simple
XmlNodeList _NodeList = _Document.GetElementsByTagName("myListGrid");<br />
should be enough.
Sylesh wrote:
List.Add(_Node.Attributes.GetNamedItem ("value").InnerText);
Or does it fail there?
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="userNames" type="Sedc.WinForms.TabControl.Configuration.cs"/>
</configSections>
<userNames>
<sylesh>
<add key="IsCustomized" value="false" />
<listGridCustomizations>
<myListGrid>
<add key="Column0" value="Sylesh0" />
<add key="Column1" value="Sylesh1" />
<add key="Column2" value="Sylesh2" />
<add key="Column3" value="Sylesh3" />
<add key="Column4" value="Sylesh4" />
<add key="Column5" value="Sylesh5" />
<add key="Column6" value="Sylesh6" />
<add key="Column7" value="Sylesh7" />
<add key="Column8" value="Sylesh8" />
<add key="Column9" value="Sylesh9" />
</myListGrid>
</listGridCustomizations>
<listGridCustomizations>
<wrwerwer>
<add key="Column0" value="Sylesh0" />
<add key="Column1" value="Sylesh1" />
<add key="Column2" value="Sylesh2" />
<add key="Column3" value="Sylesh3" />
<add key="Column4" value="Sylesh4" />
<add key="Column5" value="Sylesh5" />
<add key="Column6" value="Sylesh6" />
<add key="Column7" value="Sylesh7" />
<add key="Column8" value="Sylesh8" />
<add key="Column9" value="Sylesh9" />
</wrwerwer>
</listGridCustomizations>
</sylesh>
</userNames>
</configurations>
|
|
|
|
|
removing path from GetElementsByTagName(...) didn't help?
David
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
I take in a xsl file the data from a xml file: <xsl:value-of select="name">. How do i do so that the "name" apears as a link to "name". (for ex.:if name is "www.codeproject.com" the i want ro appear as a link to it's own text).
Thanks!
|
|
|
|
|
oh I don't undestand what is your goal. Plz try to edit your post (modify) so we can see <xsl:value-of select="name"> - I don't think everybody looks at source code to see what you indended to write - you have to check "do not treat..." or escape all < and >.
Do you have XML like <name>www.codeproject</name> and you want to do what with it? transfrom it to hyperlink?
One way is:
<br />
<a><br />
<xsl:attribute name="href"><br />
<xsl:value-of select="name" /><br />
</xsl:attribute><br />
<xsl:value-of select="name" /><br />
</a><br />
Or do you want something else?
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Hi all,
I am new to XML. I am trying to fill a Dataset with the help of XML. But what I want to do is to verify the data against an XML schema file(XSD file) and then fill it in the Dataset. Is it possible. If yes can anyone help me please.
|
|
|
|
|
Can you put me on the track for understanding and creating web services? I have gone through w3schools tutorials about SOAP but with that I could not write any web services.
When I google for web services there are lot of tutorials.
There are SOAP,REST etc don't know what they are.
I want to use PHP for web services.
Please help
Ranjan
|
|
|
|
|
Hi,
This project is on developing a portal using DiGIR technology. There is a portal.xml file that need to be edited.I'm confused and not sure which part is need to be edited.This project is basically run by two environment which consist of engine and presentation layer. The problem is taht I can't insert the provider to the portal.According to relevant source there is a problem in the schema file.
<br />
<providerFilter>org.calacademy.digir.engine.Darwin2ProviderFilterer</providerFilter><br />
<xmlSchema><br />
<namespace>http:
<handle>xsi</handle><br />
</xmlSchema><br />
<protocolSchema><br />
<namespace>http:
<location>http:
<handle>digir</handle><br />
</protocolSchema><br />
<contactEmail>your.name@your.domain.com</contactEmail><br />
</config><br />
<!--
Please reply as soon as possible to whom it's concern.
Thank you.
|
|
|
|
|
ok,
first, do you know that you can edit your (non-anonymous) post? There is no need to post it again.
and second, if I understand correctly that problem is with editing some (configuration?) file - portal.xml, so you should seek help at DiGIR website...
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|