|
Hi,
I bought Wrox (Programmer to Programmer) Professional XML in the year 2000, and I would recomend it. I don't think it's available now but has been split into various versions aimed at Java, Apache, ASP, etc. I'm guessing that most of the content is much the same in the other books.
FYI the authors of my copy are:
Didier Martin, Mark Birbeck, Michael Kay, Brian Loesgen, Jon Pinnock, Steven Livingstone, Peter Stark, Kevin Williams, Richard Anderson, Stephen Mohr, David Baliles, Bruce Peat,Nikola Ozu.
I would think that anything with a combination of some of these authors would be good.
If you're doing XSLT then Michael Kay's book (Wrox) XSLT Programmers Reference is one of the best programmers books that I've ever come across.
Cheers
Phil Hobgen
Southampton, UK
|
|
|
|
|
Can you maybe supply me the ISBN number of this book you mentioned?
What skills do you specialise in?
|
|
|
|
|
Brendan Vogt wrote:
Can you maybe supply me the ISBN number of this book you mentioned?
1-861003-11-0
I think it's out of print but still listed on Amazon (UK) as available "used and new" very cheaply. A few parts of the book will be outdated, unless there was a 2nd edition. An alternative might be Professional ASP.NET 1.0 XML with C# (1-861007-24-8), which has some of the same authors involved - but I haven't read it!
Brendan Vogt wrote:
What skills do you specialise in?
Delphi for Win32 apps and C# for Web & Windows Forms; + XML, SQL Server, etc.
Cheers
Phil Hobgen
Southampton, UK
|
|
|
|
|
Is this (Professional XML) a good book for XML beginners?
Thanks
|
|
|
|
|
Guys,
I have been trying to transform and XML file using XSLT 1.0 but haven't been able to as i want to get the minimum value,abs. I tried using EXSLT but cannot get it running as i keep getting one or the other stupid errors. If possible please provide me with a sample if ur using the namespace http://exslt.org/dynamic or math or func or sumthing.
Thanx
regards
Wilbur
|
|
|
|
|
Hi,
I don't know about EXSLT but I remember performing an abs type operation by converting the number to a string using something like
format-number(value, "+#.##;-#.##")
then you can trim the leading + or - and convert back to a number.
It's a bit convoluted, but can be done.
Cheers
Phil Hobgen
Southampton, UK
|
|
|
|
|
Hi!
I am using windows applications and I am trying to create a application config file.
I have created an app. config file thru add item and this is how it looks..
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="FilePath" value="C:\testConfig.xml" />
</appSettings>
</configuration>
And from my code I am accessing the config file soemthing like this
using System.Configuration;
string path = ConfigurationSettings.AppSettings("FilePath");
I am getting this error:
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll Only elements allowed
I would appreciate any insight
Thanks in advance
|
|
|
|
|
I'm using the Microsoft Communications API SDK to make SIP calls.
I then try to register with the Asterisk[^] registrar, however it never works. From the SDK documentation says I need to write an XML profile. I haven't managed to write one yet that works. Can anyone help please? TIA
Jerry
I feel like I'm diagonally parked in a parallel universe
Jerry Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
I see the syntax of msxsl.exe says -o for output. But I do not know how to apply it.
I would like to write a batch program that outputs the result to a file named week3result.xml. This is what I have
C:\XML_Class\msxsl.exe C:\XML_Class\week3\MomAndPop.xml C:\XML_Class\week3\order.xsl -o c:\xml class\week3\week3result.xml
Thank you.
Again I am looking for the correct syntax to direct the output from the screen to a file.
|
|
|
|
|
Hi,
You need quotes round the output filename, it's got a space in it.
Cheers
Phil Hobgen
Southampton, UK
|
|
|
|
|
i wrote a simple line of code that retrives a value from a static XML file but my problem that it returns diffrent result every time it runs, the line is:
string asd = VoteData.DocumentElement.ChildNodes[1].ChildNodes[1].InnerText;
maybe that happen coz the file is not completely loaded , i'm using C# but i don't found any method that let me know if the file is completely loaded or not, i know that theres a function in javascript which is : readyState that do the job, but i can't found any in C#, can anyone help ?
thanx in advance.
|
|
|
|
|
Hi Guys,
I am using XML 2.0 to parse some files in Windows CE .NET 4.2. I am thinking of using XML 3.0 for parsing purpose. Will this increase the performance? Will this improve the speed of parsing?
If you guys have any articles on this please send me.
With regards
A.Santosh
|
|
|
|
|
Hi..
I am having some problems with the xmldocument. Below is my code...can anyone tell me why the output is not well formed..this is my ouput for the following code...
<?xml version="1.0" ?>
- <Persons>
- <Person Name="v" Age="00">
<Title="v" />
</Person>
</Persons>
why is the Title element not complete???
XmlDocument xmlDoc = new XmlDocument();
XmlDeclaration xmlDeclaration = xmlDoc.CreateXmlDeclaration("1.0",null,null);
XmlElement rootNode = xmlDoc.CreateElement("Persons");
xmlDoc.InsertBefore(xmlDeclaration, xmlDoc.DocumentElement);
xmlDoc.AppendChild(rootNode);
XmlElement Node = xmlDoc.CreateElement("Person");
Node.SetAttribute("Name", name);
Node.SetAttribute("Age", age);
xmlDoc.DocumentElement.AppendChild(Node);
XmlElement Node1 = xmlDoc.CreateElement("Title");
Node1.SetAttribute("Title", title);
Node.AppendChild(Node1);
Thank you
|
|
|
|
|
The output IS well formed. When a node does not have children, it can be shown like this:
<Title></Title>
OR like this:
<Title/>
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Ooops - I meant to say that <Title/> is the same as <Title></Title>, but I forgot to check the little box
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi
I have a few textbox entries that i have written to an xml file and now I have to add a datasource as its child node. Any ideas on how to achieve this. I did try WriteXml method for datasource but this does not write to the file as a child node.
This is what I am trying to do
<Query name = "XYZ", age = "123" >
<Criteria>
<criterion display = "aaaa", commname = "kkkkkk">
</criterion>
<Criteria>
<Query>
The query's name and age are textbox entries and the Criteria is a part of the dataset. So i am trying to insert <Criteria> as child node to <query>
Any ideas will be greatly appreicated
Thanks in advance
|
|
|
|
|
hi, I think you can write your Criteria node to, say XmlDocumentFragment (using XmlWriter ), and then append it as node to your original XML - assumming it's in XmlDocument or similar (basicaly everything with AppendChild method ). Or you can probably work with XmlWriter directly.
Does it help?
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
David
I looked into XmlWriter class. The problem is writing the complete dataset individually by adding elements and its attributes. Criteria has a about 10 columns that I did not specify in the mail. If I were to use XmlWriter then I would have to append every single column as an element. But the datasource's writeXml method takes care of everything. Would you happen to know how I can create a document fragment and somehow use ds.WriteXml("Filename") method
Thanks!!!
Rekha
|
|
|
|
|
hi,
Of course you can let dataset do lot of work for for you! you can use
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatasetclasswritexmltopic4.asp">WriteXml(XmlWriter) </a>[<a target=_blank title='New Window' href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatasetclasswritexmltopic4.asp">^</a>]<br /> overloaded method to write columns and all into XmlWriter at once. Bt yes, you would have to write your Query element by yourself...
example:
XmlTextWriter w = new XmlTextWriter(filename);
w.WriteElementStart("query");
ds.WriteXml(w);
w.WriteElementEnd();
w.Close();
It's not exact code - just idea how to do that... I don't know exact method names and arguments from heart... I think this way it should work...
As for XmlDocument, sorry. I forgot you can load XML into it with XmlReader, bt AFAIK you can't write into it with XmlWriter. My fault.
hmm or you can save dataset into file, than load it to XmlDocument and than you can create XmlDocumentFragment from it. Next step is to append Criteria node to Query element - It suppose to have Query also loaded in (another) XmlDocument - probably less efficient solution than the first one ( with XmlTextWriter).
David
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
|
Hi.
Ive been looking on the net for weeks in trying to convert a .NET dataset to the standard ADO recordset schema - but with no luck. Ive had a go myself, but can't seem to produce the results I want.
Heres the dataset:
<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://tempuri.org/mytestWS">
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:Locale="en-GB">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="ProductID" type="xs:int" minOccurs="0" />
<xs:element name="ProductName" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<Table diffgr:id="Table1" msdata:rowOrder="0">
<ProductID>189</ProductID>
<ProductName>Product Name 1</ProductName>
</Table>
<Table diffgr:id="Table2" msdata:rowOrder="1">
<ProductID>313</ProductID>
<ProductName>Product Name 2</ProductName>
</Table>
</NewDataSet>
</diffgr:diffgram>
</DataSet>
And here is what im trying to achieve:
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=""urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly">
<s:AttributeType name="ProductID"/>
<s:AttributeType name="ProductName"/>
<s:Extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row ProductID="189" ProductName="Product Name 1"/>
<z:row ProductID="313" ProductName="Product Name 2"/>
</rs:data>
</xml>
As you can see in the Dataset I need to extract name="ProductID" from the <xs:element>, and write it to the <s:AttributeType> node - same with the <z:row>
Could anyone help me here?
J
|
|
|
|
|
Hello
I am facing a strange encoding problem using xsl transformation.
Concisely, i execute a SQL statement to fill a recordset which contain
some fields with Greek Characters saved as UTF-16 (on SQL Server 2000 using nvarchar) ,which then i save to the Response object of an ASP page as xml (adPersistXML).Then i use an xsl file
to transform XML to HTMl.The problem is that when i see the page in the
internet explorer instead of the greek character i get something like this
"ΕΛΛΗΞΞ™ΞšΞŸΞ£ Ξ¤Ξ™Ξ¤Ξ›ΞŸΞ£" . Moreover when i do a "view source" and
see the HTML source using Notepad the Text is displayed correctly in Greek.
I am using the following ASP code to do the transformation :
<br />
' rs is an ADO recordset filled with data from a sql Select statement<br />
styleFile = Server.MapPath(xslfile)<br />
set stylexml =Server.CreateObject("MSXML2.FreeThreadedDOMDocument")<br />
stylexml.async = false<br />
stylexml.load(styleFile)<br />
<br />
<br />
<br />
set sourcexml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")<br />
sourcexml.async = false<br />
<br />
rs.Save sourcexml,1 ' Save as adPersistXML<br />
set rs=Nothing<br />
<br />
<br />
<br />
strPath=BuildPath(id,18)<br />
dim xslty,xslProc<br />
set xslt = Server.CreateObject("MSXML2.XSLTemplate")<br />
xslt.stylesheet =stylexml<br />
Set xslProc =xslt.createProcessor()<br />
xslProc.input=sourcexml<br />
xslProc.addParameter "Path",escape(strPath)<br />
Response.charSet = "UTF-8"<br />
xslProc.output = Response<br />
xslProc.transform
The xsl file is created using visual studio , saved as unicode file and inside it i define the encoding like this : <xsl:output encoding="utf-16" method="html" version="4.0">
I know that the problem was to do with "BIG endian" and "Little endian" switces
the ADO recordset is being saved as UTF-16 big endian (UTF-16BE). Rather, the data is. "Endianness" only matters when serializing UTF-16. When it's in-memory, it doesn't
matter. When there is no byte order mark, it's supposed to be Big Endian.
Although i've not managed to find any solution.
Any ideas ?
Thanks in advanced
Theodore Papadopoulos
|
|
|
|
|
oups , i forgot to include the xsl:output i use.
The xsl file is created using visual studio , saved as unicode file and inside it i define the encoding like this :
<xsl:output encoding="utf-16" method="html" version="4.0">
|
|
|
|
|
encoding="utf-16" method="html" version="4.0"
|
|
|
|
|
hi,
I have some ideas <smal;>(probably not the solution, bt one never knows ). First make sure that problem is not caused by IE settings Do you have encoding in IE set to UTF-16 (or auto-select)? (View->Encoding ...)
Second, teo_xp wrote:
Response.charSet = "UTF-8"
Shouldn't there be UTF-16 instead?
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|