|
I have just downloaded the Codegenerator add in to LiquidStudio.
I'm underwhelmed. It doesnt appear to give me anything more than I get when I run the scheme through the Visual Studio add in XSD.EXE
Am I missing something?
Ger
|
|
|
|
|
Hello
I am new to this world and perhaps starting at the wrong end. Anyway. I am developing a web shop. I want to display product information from another source that I have access to. That source is in xml file format.
my question is: How can I do display the data from another source on my web side?
Hope someone can help.
Thank you
Halldor
|
|
|
|
|
1. Get the xml
2. Parse it
3. Create something from that appropriate to your site (consumable by the rest of your site)
4. Pass that off to the rest of your site.
More precise details depends on more precise details of the xml and your site.
|
|
|
|
|
Thank you jschell
I am a little bit closer to what to do. I am trying to build a web shop (with out the cart and the check out functon) and need to display the data on my web site. I have few question´s:
1. Is the XML a separate file stored at my server or is the xml integrated in the xml?
2. Can I use html to display the data in the xml or is java or css necessary?
Thank you
Halldor
Halldor
|
|
|
|
|
Hi,
I have this code to generate xml file;
XmlTextWriter myXmlTextWriter = new XmlTextWriter ("D:/New Folder/MyXmlff.xml",System.Text.Encoding.UTF8);
myXmlTextWriter.Formatting = Formatting.Indented;
myXmlTextWriter.WriteStartDocument(false);
myXmlTextWriter.WriteStartElement("root");
myXmlTextWriter.WriteAttributeString("xmlns","urn:iso:std:iso:20022:tech:xsd:pain.001.001.02");
myXmlTextWriter.WriteStartElement("pain.001.001.02");
myXmlTextWriter.WriteComment("Section A : Group Header");
myXmlTextWriter.WriteStartElement("GrpHdr");
myXmlTextWriter.WriteStartElement("MsgId");
myXmlTextWriter.Flush();
myXmlTextWriter.WriteEndElement();
myXmlTextWriter.WriteEndElement();
myXmlTextWriter.Close();
the problem is the attribute of the root appears always in other tags like this:
<root xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">
<pain.001.001.02>
<salarié xmlns="A01">
<grphdr>
<msgid>
<credttm xmlns="25/02/2011 04:50:31">
<btchbookg xmlns="True">
<nboftxs xmlns="1">
<ctrlsum xmlns="100">
<grpg>
<initgpty>
</Salarié>
</pain.001.001.02>
</root>
but i want that xmlns appears ONLY as an attribute of the root like this:
<document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">
<pain.001.001.02>
<grphdr>
<msgid>FVIR/101230/1
<credttm>2010-12-30T17:02:21
thank u for u help
hugs
<btchbookg>false
|
|
|
|
|
I assume this is a small fragment of your code, not the entire body of the method. Does the number of calls to WriteEndElement in your program match the number of calls to WriteStartElement?
|
|
|
|
|
I have an algorithm to parse a complex XML document using DOM via a recursive 'Navigate' function. Values are ultimately displayed on a form. New nddes are added to the document by supplying a ancestry list to a 'Create node' function, while nodes are updated by making use of Xpath.
Sounds very good but I dont like it because of all the hardcoded nodenames.
Now I have taken the corresponding XSD and laundered it through XSD.EXE to give me a set of classes that correspond to the XML document.
I like the idea that I can de-serialize the XML document into this class, present the data on a form, make any changes and serialize it out to a new XML document. Is it really that simple?
The first thing that troubles me is that I could potentially be rewriting the entire document just to correct a single spelling mistake...
Ger
|
|
|
|
|
Hi All,
We want to generate xml file based on schema file.
Only the xml file is generated we need to populate data by passing objects, because we need to generate so many xml file.
Final output should be a xml file with data.
New to xml,Please help me with this.
Thanks in advance.
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
See my post above. If you are using Visual Studio there's a utility called XSD.exe which you run form the VS command prompt.
XSD.exe <Schemaname1.XSD> <Schemaname2.XSD> /c
this will generate a class based on your XSD's - Note if your schema imports from another schema then that schema name has to be included in the command. The /c at the end will give you a C# class.
While I am exploring going down this route, I currently use the document object model (DOM) using a recursive Navigate algorithm from Ch 14 of Stehen Fraser's "Pro Visual C++/CLI and the .NET 3.5 Platform". My post above gives more insight into how I use this.
I also draw heavily from Bipin Joshi's "Beginning XML with C# 2008 From Novice to Professional"
Ger
|
|
|
|
|
Can somebody please give some light in terms of customizing XSL to display RSS feed your way on SharePoint.
I want my RSS FEED style to be something like....
example.
Artile heading
22 Feb 2011 | Code project rocks,
This is my statement.
...More
I would appreciate your help guys.
Kind Regards,
Sparks
|
|
|
|
|
|
Pardon me if i have posted at wrong place. I wasnt quite sure where to post this.
my application generates report as doc file.
In the process, it opens word file physically, writes a single rtf template line and text into it, save(s) word file as WordML, closes word file, deletes it.
And this is done many times (at least 15 times).
This physical opening of word, etc takes upto 5-7 seconds each times, and thus report generation takes large minutes.
I would like to know if there is some rtf-wordML generator code (free). Please help me with same.
modified on Wednesday, February 9, 2011 9:34 AM
|
|
|
|
|
Hi
I'm trying to modify an Xml file. This is the content of the Xml. The problem is that after changes, it will creates a copy of the content of the Xml file without changing the old content.
Before changes :
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="Application.Properties.Settings.DBConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DB.mdb"
providerName="System.Data.OleDb" />
</connectionStrings>
</configuration>
After changes :
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="Application.Properties.Settings.DBConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DB.mdb"
providerName="System.Data.OleDb" />
</connectionStrings>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="Application.Properties.Settings.DBConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DataBase\DB.mdb"
providerName="System.Data.OleDb" />
</connectionStrings>
</configuration>
The code is :
System.Xml.XmlDocument xdoc = new System.Xml.XmlDocument();
FileStream reader = new FileStream(this._XmlFilePath, FileMode.Open, FileAccess.ReadWrite);
xdoc.XmlResolver = null;
xdoc.Load(reader);
System.Xml.XmlElement Node = (System.Xml.XmlElement)xdoc.DocumentElement.SelectSingleNode("//configuration/connectionStrings/add[@name=\"Application.Properties.Settings.DBConnectionString\"]");
if (Node != null)
{
Node.Attributes.GetNamedItem("Source").Value = "C:\DataDabe\DB.mdb";
xdoc.Save(reader);
reader.Close();
}
"For as long as men massacre animals, they will kill each other. Indeed, he who sows the seed of murder and pain cannot reap joy and love." Pythagoras
|
|
|
|
|
yes it suppose to do, because you are saving the xml in same stream.
try this
if (Node != null)
{
Node.Attributes.GetNamedItem("Source").Value = "C:\DataDabe\DB.mdb";
reader.Position = 0;
xdoc.Save(reader);
reader.Close();
}
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
hi thanks for the answer..it partially solved the problem.
now the result is :
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="Application.Properties.Settings.DBConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DataBase\DB.mdb"
providerName="System.Data.OleDb" />
</connectionStrings>
</configuration>tem.Data.OleDb" />
</connectionStrings>
</configuration>
this part is wrong :
tem.Data.OleDb" />
</connectionStrings>
</configuration>
"For as long as men massacre animals, they will kill each other. Indeed, he who sows the seed of murder and pain cannot reap joy and love." Pythagoras
|
|
|
|
|
okay do this
System.Xml.XmlDocument xdoc = new System.Xml.XmlDocument();
xdoc.XmlResolver = null;
xdoc.Load(this._XmlFilePath);
System.Xml.XmlElement Node = (System.Xml.XmlElement)xdoc.DocumentElement.SelectSingleNode("//configuration/connectionStrings/add[@name=\"Application.Properties.Settings.DBConnectionString\"]");
if (Node != null)
{
Node.Attributes.GetNamedItem("Source").Value = "C:\DataDabe\DB.mdb";
xdoc.Save(this._XmlFilePath);
}
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
perfect thanks!!!
"For as long as men massacre animals, they will kill each other. Indeed, he who sows the seed of murder and pain cannot reap joy and love." Pythagoras
|
|
|
|
|
Hi All,
I have one weird problem in my XSL transform. The Java code is writing data into XSL using XMLWriter.
The Java code line looks like this ...
xmlWriter.writeElement( "notation", "(A)=(B)+(C)");
I dont want to do any String concatenation here and I wanted the out put in XSL as (A)=(B)+(C)
But I see the + symbol is missing in my XSL out put and value get displayed as (A)=(B)(C)
I use UTF-8 encode in my XSL .
Is there any encoding mechanism ? Is it possible to handle at Java or XML level ?
Please share your thoughts out of your experience .
* Thanks
|
|
|
|
|
I am using Silverlight 4 and WCF
In the WCF I write a datatable to a stringreader and return the string to the UI. In the UI I need to turn the string into an object (Telerik datatable class) which requires that I read the elements to create the columns and the data to populate the rows.
Problem is when the data has null values the xml does not get a full set of elements, the table is invalid in the UI. To solve this I want to include the schema in the string passed to the UI.
However I cannot work out how to get the schema out of the xDocument. This receives the string and creates the xDocument, I then need to get the schema to create the columns
void GenericProcedureCompleted(object sender, GenericProcedureCompletedEventArgs e)
{
svcClient.GenericProcedureCompleted -= new EventHandler<GenericProcedureCompletedEventArgs>(GenericProcedureCompleted);
ShowError(e.sErrorMsg);
if (!string.IsNullOrEmpty(e.Result))
{
System.IO.StringReader sr = new System.IO.StringReader(e.Result);
XDocument xDoc = XDocument.Load(sr);
CreateTable(xDoc);
}
}
This is currently using the elements to create the table
xEl = xDoc.Descendants("XMLData").ToList()[0];
foreach (XElement xe in xEl.Elements())
{
oCol = new CTUI.Data.DataColumn();
oCol.ColumnName = xe.Name.LocalName;
oCol.DataType = typeof(string);
dtData.Columns.Add(oCol);
}
Ant suggestions that are valid for Silverlight 4 will be welcome. Note Silverlight 4 does not support all xml structures.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi Everyone,
Can anyone help me in xsl drop down which i need to display the selected value. I have two pages.
First Page
I have written a html tag in xsl which has six options say one,two....
After selecting one of the value it is stored in the database.
Second Page
Here also I have written the same html tag in xsl. but here the issue is i need to display the selected value which is retrieved from database.
Please let me know if any one has a sample code
Thanks in Advance .
Regards,
Manowj
|
|
|
|
|
Hi, I asked a Q in C# forum, but i also trying here.
please help me with this Q
many thanks
|
|
|
|
|
Hi.
How can i save a word document to xml format for parsing later with xslt.
I noticed that word 2007-2010 document are constructed with the openxml format so i can use openxml tools to save it.
But word 2000-2003 seems to be in binary format.
Is there a tool that i can use for this mission?
Thanks
|
|
|
|
|
don't post same question in more than one forum.
It create cross post. be aware from it.

|
|
|
|
|
How do I include PHP codes in an XML file?
I have a FLASH Gallery that i want to alter the names of the photo's
but i can't do that because i don't know how to include the PHP in the XML file ,, can you help me ? 
|
|
|
|
|
We need more details in order to answer this.
Why do you want to embed PHP in the XML? How is the XML being used? This sounds potentially dangerous.
|
|
|
|