|
Please refer this[^] for more information.
Regards,
Paresh.
|
|
|
|
|
Can anyone please tell me what is DTD/XSD ??
My client wants the DTD/XSD for creation of xml files. Can anyone please send me an example if youll have
|
|
|
|
|
DTDs and XSDs (Xml Schema) are files that specify the allowable structure of XML files. They define the entities and relationships represented in XML files. So that you can validate XML against them to know that your XML conforms to the rules of the DTD/XSD.
DTDs are the old standard for doing this. XSDs are the new standard. Google XSD and you'll find lots of references. If you don't really want to learn XSD right this minute, or you just need an XSD spec immediately, there are tools out there that can help. XMLSpy will generate an XSD from XML if you have sack loads of cash. Skeleton Crew[^] can also produce an XSD for you. Just drop in some XML that has all your possible nodes/attributes, set your renderer to XSD, and build. The XSD that's generated will likey need a little work (changing the optional/required attributes where appropriate), but it will give you a good starting schema. But like I said, google XSD, W3 Schools has a good XSD reference to help you finish your spec out.
Hope that helps.
|
|
|
|
|
hello
i am new user of this group.i have a problem in javascript. i have already created treecheckbox but the node name came manualy. how to show the treecheckbox node name from the xml file.
Plz. reply me as soon as possible.
Thanks.
Shalini
snitu
|
|
|
|
|
hey,
I'm trying to open a script in a new window but the script is in a form like this:
<table name="qml_scripts"><br />
<row><br />
<column name="QMLSCR_KEY">1</column><br />
<column name="QMLSCR_CODE">REPORTS_OUT</column><br />
<column name="QMLSCR_SOURCE">'##################################################################################################<br />
' VBScript for XML Billing Interface towards HL7 (DFT specific)<br />
' made by JDS (c) Agfa-Quadrat N.V.<br />
'<br />
' Usage : In combination with :<br />
' =============================<br />
' * QSender where XML is generated by script HL7_DFT_BILLING.SQL<br />
' (Events ONL_INT_INV or ONL_INT_DFT)<br />
' * QDFACXML_NLX where XML is generated by snapshot packages<br />
'<br />
'##################################################################################################<br />
'version: 2005.3.0<br />
'Last Changed: Apr 02, 2007<br />
'Reason:
and so on...
Now, when I pass this argument to my javascript he gives an error on the enters and quotes
XSLT:
<br />
< xsl: for-each select="/table/row[1]/column"><br />
encode(< xsl: value-of select="." />)<br />
< / xsl:for-each><br />
Can I encode this or open that script in another window?
thx alot!
|
|
|
|
|
Hello Everybody, I have XML Serilized data stored in the database. Now I want to Deserialze that data at run time. Anybody know how deserialze data at Run time.
Thankyou in Advance
|
|
|
|
|
swguy23 wrote: Anybody know how deserialze data at Run time.
So you don't know how to deserialize your data correct? The "at Run time" part doesn't really mean anything correct?
Different platforms and development environments have different XML libraries so without knowing what yours are it is difficult to help. However in most cases the Serialize/Deserialize are both included so however you "Serialized" you use the same library (API) whatever to Deserialize.
led mike
|
|
|
|
|
To deserialize XML, you have to have a code model that is set up to mirror your XML structure (classes making use of the XMLSerializer attributes). Take a look at my article Using the XmlSerializer Attributes[^].
If that is what you are talking about, I have a tool that can help at BoneSoft.com[^]. Just drop in the XML you are dealing with, set the renderer to C# or VB.Net (whatever you are working with) and build it. It will produce an XML serializable class model you can use to deserialize you XML to. It will also produce a class that handles the serialization/deserialization for you.
Hope that helps.
|
|
|
|
|
Hi all, please see below is for the xml output file.
<AMS Provider="ABC" Product="MOD" Versiob_Major="1" Description="Movie on demand asset_packege" Asset_Class="MOD"/>
<App_Data App="MOD" Name="type" Value="title"/>
this is the generated xml file that i've got, so i want to create the codes using ASP.net to generate this xml output. but i new to xml so dont know how to write the codes. please assist. thanks!
Veasna
-- modified at 21:57 Wednesday 4th April, 2007
|
|
|
|
|
Those elements are not well-formed. Names must start with a Letter, an underscore, or a colon.
|
|
|
|
|
I'm attempting to modify an XML Document using System.Xml's DOM methods. I'm loading a template document, then modifying it with values from my application.
The final document has some repeating nodes, where the template document includes only one template node for these. I use the following technique to create the required nodes:
XmlNode node = requestedMessagesElement.SelectSingleNode(
"//Message");
XmlElement firstMessageElement = (XmlElement)node;
// Add message nodes for each message
for (long i = 0; i < numMessages; ++i)
{
XmlElement messageElement;
// For first element, modify existing message
if (i == 0)
messageElement = firstMessageElement;
// For successive elements, copy existing element to modify
else
{
messageElement = (XmlElement)firstMessageElement.Clone();
messageElement =
(XmlElement)requestedMessagesElement.AppendChild(
messageElement);
}
// Other modifications here
}
For some reason, when I execute the code, the resulting XML misplaces the resulting nodes. For example, if the nodes are appended in order "1, 2, 3", I'm consistently getting results in order "3, 1, 2".
Any suggestions greatly appreciated.
PS. I use the value returned from "AppendChild" as the documentation states that the method returns the appended node - just covering tracks in case the system decides to insert a copy of the passed node for some reason.
|
|
|
|
|
I had created an Xml file using XmlTextwriter in webapplication.
like this
XmlTextWriter writer = new XmlTextWriter(Server.MapPath("applicant.xml"), Encoding.UTF8);
writer.WriteStartDocument();
writer.WriteStartElement("Applicant");
and so on when i click a button
...........Now can i retrieve that xml file in browser when i click a button...........i do not want to bind to any of the asp.net controls. i would like to display that Xml file in browser.............
Can anyone help me in this regard.........
|
|
|
|
|
Simplest way I can think of is redirecting the response to the created XML file: Response.Redirect("applicant.xml");
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
honeyss wrote: Now can i retrieve that xml file in browser when i click a button
You do it all in a single request eliminating the writing to disk part. In the button handler event you create a memory rather than disk file XmlTextWriter and then set the Response Content-Type to XML and use Response.Write(...) to return the XML.
led mike
|
|
|
|
|
I'm working on an XSL stylesheet to transform data from XML to CSV. (With .net 2.0)
I have everything working except being able to double-up or escape quote characters within strings.
What I understand from the book I have I would need to use EXSLT;
A) str:replace
B) str:split and str:concat
C) regexp:replace
I don't want to have to install anything "extra" onto client systems.
What other options are there?
|
|
|
|
|
Alright, I got it working by using a param with my template and calling it recursively as required.
<xsl:template match="*">
<xsl:param name="Cont" select="."/>
<xsl:if test="@Null='false'">
<xsl:text>"</xsl:text><xsl:value-of select="substring-before(concat($Cont,'"'),'"')"/><xsl:text>"</xsl:text>
<xsl:if test="contains($Cont,'"')">
<xsl:apply-templates select=".">
<xsl:with-param name="Cont" select="substring-after($Cont,'"')"/>
</xsl:apply-templates>
</xsl:if>
</xsl:if>
</xsl:template>
Note the use of concat() in the call to substring-before().
Here the param is named "Cont" and you can think of it as meaning either "contents" or "continuance".
Given an initial value of: aaa "bbb" ccc
1) Output "aaa "
2) Recurse with bbb" ccc
3) Output "bbb"
4) Recurse with ccc
5) Output " ccc"
Result: "aaa ""bbb"" ccc"
I would appreciate any thoughts on this technique.
|
|
|
|
|
Hello,
My task is to convert race results like this to XML:
http://www.sportstats.ca\res1997\nord10k.htm
You can see that there are 1,948 race results. I need to create 1,948 xml elements. I would like to see XML data like this:
<Racer>
<Place>1</Place>
<ClockTime>29:41</ClockTime>
<PacePerK>2:59</PacePerK>
<BibNumber>1868</BibNumber>
<Name>Rachid TBAHI</Name>
<City>Sleepy Hollow</City>
<Prov>NY</Prov>
<CategoryPlace>1/213</CategoryPlace>
<GenderPlace>1/1216</GenderPlace>
<Category>Men 30-34</Category>
</Racer>
I've shown just the first entry, and would expect to see 1,947 more.
A few months ago, I wrote some C# code that would convert the URL above to the kind of XML I wanted. I noticed that the race results were all after a <pre> tag. I found that I had to use a C# regular expression to parse the race results. Creating one regular expression isn't so bad, but there is so much race results data, conforming to many different regular expressions, that this becomes a large project for me.
Recently, I found out about Dapper and thought it would be able to make this a manageable project. Their website is here: http://www.dapper.net/
I have tried unsuccessfully to create a Dapp that will do this. If you look at the source html for the sportstats URL, you will see that there isn't anything delineating the attributes I need to capture. It's not like a CSV file - it's more like an old fashioned mainframe fixed width file. I can't seem to define fields for the Dapp, as a result.
Any suggestions are most welcome!
Richard Rogers
|
|
|
|
|
Yeah, a regular expression. But I don't see why more than one would be required. (Not that I'm an expert.)
|
|
|
|
|
Hello,
The only reason more than one is required is because I need to import the following datasets:
http://www.sportstats.ca/res1997/nord10k.htm
http://www.sportstats.ca/res1997/sunny10.htm
http://www.sportstats.ca/res1997/ncm.htm
http://www.sportstats.ca/res1997/niaghalf.htm
http://www.sportstats.ca/res1997/niagmara.htm
http://www.sportstats.ca/res1997/ncmh.htm
http://www.sportstats.ca/res1997/rattle10.htm
http://www.sportstats.ca/res1997/xerox10.htm
http://www.sportstats.ca/res1997/sunny3.htm
http://www.sportstats.ca/res1997/ncm6k.htm
http://www.sportstats.ca/res1997/nordion.htm
http://www.sportstats.ca/res1998/nord5k.htm
http://www.sportstats.ca/res1998/ncm5k.htm
http://www.sportstats.ca/res1998/ncmmar.htm
http://www.sportstats.ca/res1998/ncmhalf.htm
http://www.sportstats.ca/res1998/sunny10.htm
http://www.sportstats.ca/res1998/reach5k.htm
http://www.sportstats.ca/res1998/kingbeat.htm
http://www.sportstats.ca/res1998/beat8k.htm
http://www.sportstats.ca/res1998/rattle10.htm
http://www.sportstats.ca/res1998/can10k.htm
http://www.sportstats.ca/res1998/grimhalf.htm
http://www.sportstats.ca/res1999/rsboiran.htm
http://www.sportstats.ca/res1999/nor10k1.htm
http://www.sportstats.ca/res1999/bay30k.htm
http://www.sportstats.ca/res1999/cimh.htm
http://www.sportstats.ca/res1999/sp10k.htm
http://www.sportstats.ca/res1999/cimm.htm
http://www.sportstats.ca/res1999/mara5.htm
http://www.sportstats.ca/res1999/rdkiran.htm
http://www.sportstats.ca/res1999/mara.htm
http://www.sportstats.ca/res1999/marah.htm
http://www.sportstats.ca/res2000/bay30k.htm
http://www.sportstats.ca/res2000/mds10k.htm
http://www.sportstats.ca/res2000/cimh.htm
http://www.sportstats.ca/res2000/ncmhalf.htm
http://www.sportstats.ca/res2000/ncm5k.htm
http://www.sportstats.ca/res2000/ncmmara.htm
http://www.sportstats.ca/res2000/cimm.htm
http://www.sportstats.ca/res2000/compu10.htm
http://www.sportstats.ca/res2000/casm.htm
http://www.sportstats.ca/res2000/gatorh.htm
http://www.sportstats.ca/res2001/nord10k.htm
http://www.sportstats.ca/res2001/bay30.htm
http://www.sportstats.ca/res2001/marahalf.htm
http://www.sportstats.ca/res2001/cimh.htm
http://www.sportstats.ca/res2001/mara5k.htm
http://www.sportstats.ca/res2001/mara.htm
http://www.sportstats.ca/res2001/cimm.htm
http://www.sportstats.ca/res2001/legacy5k.htm
http://www.sportstats.ca/res2001/pb5k.htm
http://www.sportstats.ca/res2001/casnm.htm
http://www.sportstats.ca/res2002/nord10k.htm
http://www.sportstats.ca/res2002/marah.htm
http://www.sportstats.ca/res2002/cimhalf.htm
http://www.sportstats.ca/res2002/scotiah.htm
http://www.sportstats.ca/res2002/bay30k.htm
http://www.sportstats.ca/res2002/mara.htm
http://www.sportstats.ca/res2002/mara5k.htm
http://www.sportstats.ca/res2002/cimmara.htm
http://www.sportstats.ca/res2002/pb5k.htm
http://www.sportstats.ca/res2002/casha.htm
http://www.sportstats.ca/res2003/marahm.htm
http://www.sportstats.ca/res2003/nord10k.htm
http://www.sportstats.ca/res2003/sp10k.htm
http://www.sportstats.ca/res2003/bay30.htm
http://www.sportstats.ca/res2003/timha.htm
http://www.sportstats.ca/res2003/scotiah.htm
http://www.sportstats.ca/res2003/mara5k.htm
http://www.sportstats.ca/res2003/marama.htm
http://www.sportstats.ca/res2003/timma.htm
http://www.sportstats.ca/res2003/casha.htm
http://www.sportstats.ca/res2004/marahm.htm
http://www.sportstats.ca/res2004/nordion1.htm
http://www.sportstats.ca/res2004/bay30.htm
http://www.sportstats.ca/res2004/torha.htm
http://www.sportstats.ca/res2004/marama.htm
http://www.sportstats.ca/res2004/nordion5.htm
http://www.sportstats.ca/res2004/torma.htm
http://www.sportstats.ca/res2004/missh.htm
http://www.sportstats.ca/res2004/casha.htm
http://www.sportstats.ca/res2004/missm.htm
http://www.sportstats.ca/res2005/runto.htm
http://www.sportstats.ca/res2005/marahm.htm
http://www.sportstats.ca/res2005/nordion1.htm
http://www.sportstats.ca/res2005/nordion5.htm
http://www.sportstats.ca/res2005/bay30.htm
http://www.sportstats.ca/res2005/marama.htm
http://www.sportstats.ca/res2005/torontoh.htm
http://www.sportstats.ca/res2005/missh.htm
http://www.sportstats.ca/res2005/torontom.htm
http://www.sportstats.ca/res2005/missm.htm
http://www.sportstats.ca/res2006/ncmhm.htm
http://www.sportstats.ca/res2006/ncm10.htm
http://www.sportstats.ca/res2006/ncm5k.htm
http://www.sportstats.ca/res2006/bay30.htm
http://www.sportstats.ca/res2006/missh.htm
http://www.sportstats.ca/res2006/torontoh.htm
http://www.sportstats.ca/res2006/ncmma.htm
http://www.sportstats.ca/res2006/missm.htm
http://www.sportstats.ca/res2006/torontom.htm
http://www.sportstats.ca/res2006/noseh.htm
So far, I've just looked at the first four or so, and I've got about four different "regex's".
Thanks for the confirmation!
Richard
|
|
|
|
|
Ah, one per dataset makes sense for very diverse datasets, but I looked at the first three, they seem pretty similar, so one general one might to do the trick.
Or, perhaps two;
One that helps examine the column headings and the dashed-line heading to dynamically create another one that's specific to that layout?
|
|
|
|
|
In the floowinf code I am expecting to append source node to end of destination node but?????
//I get the node here based on a source and destination ID.
XmlNode sxnode = dom.SelectSingleNode("//KeeperElement[ID = " + srcID + "]");
XmlNode dxnode = dom.SelectSingleNode("//KeeperElement[ID = " + destID + "]");
//This works fine proper nodes are obtained
//This append doesn't seem to be working for some reason
dxnode.AppendChild(sxnode.CloneNode(true));
//Also the remove not working
dom.RemoveChild(sxnode);
//When I reload file it shows no changes????
I have experience with ADO.Net do I need to do some sort of Update or AcceptChanges or something similar.
Thanks
Mike
Everybody gotta be somebody
|
|
|
|
|
Where did you save the file ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sorry,
I guess that would make a difference wouldn't it??
private void button2_Click(object sender, EventArgs e)
{
string str = Application.StartupPath + "\\KeeperOut.xml";
XmlTextWriter writer = new XmlTextWriter(str, Encoding.UTF8);
dom.WriteContentTo(writer);
writer.Flush();
writer.Close();
}
Thanks
Mike
You can do anything you want but you pay for everything you do!
|
|
|
|
|
If one of my Xml elements can potentially hold a large amount of data should I be using Element or CDATA. What is the difference between the two?
As an aside this is my 100 post...yipee?
Everybody gotta be somebody
|
|
|
|
|
Mike Hankey wrote: should I be using Element or CDATA
Since a CDATA section is nested inside an element the question should be: Should I use a CDATA section or not.
Mike Hankey wrote: What is the difference between the two?
A CDATA section is ignored by the parser but also applies some requirements on the data it holds. Take a look at this link XML CDATA[^].
Mike Hankey wrote: As an aside this is my 100 post
Congratulation
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|