|
When I come home from work, I will take a look at this.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi,
Any luck with it so far ? Also i am wondering if there is any way i can extract the image from the html web page and change its dimensions and display it next to the search result.
Thanks
Andyyy
|
|
|
|
|
Hi all
I am looking at XML Serialization at the moment, most of it is pretty straight forward [so far]. I am after creating my own employee class that I am configuring for XML serialization,
1. declaring it as a Public class,
2. making all necessary variables Public and
3. adding a Parameterless constructor.
When I was looking into BinaryFormatter and SoapFormatter, to handle Deserialization I had to implement the interface IDeserializationCallback and then create a method that implements IDeserializationCallback.OnDeserialization to populate any temporary variables. How do I do this with XML Serialization?
The example I've seen in the book for MCTS exam 70-536 shows that you take your employee class and add the serializable attribute to it and implement IDeserializationCallback. You then use the attribute NonSerialized to mark a type that is not to be serialized.
Michael.
|
|
|
|
|
mike123543 wrote: The example I've seen in the book for MCTS exam 70-536 shows that you take your employee class and add the serializable attribute to it and implement IDeserializationCallback. You then use the attribute NonSerialized to mark a type that is not to be serialized
And have you tried that?
Henry Minute
If you open a can of worms, any viable solution *MUST* involve a larger can.
|
|
|
|
|
IDeserializationCallback does not seem to be available to me when using XML serialization. It would appear to be only available to SoapFormatter, BinaryFormatter or when completing Custom Serialization.
This issue would only arise if I needed to customise the xml serialization, I can always rely on the standard Custom Serialization.
Michael.
|
|
|
|
|
mike123543 wrote: This issue would only arise if I needed to customise the xml serialization
This is true.
Try this book, Chapter 7 to start[^]
It is really thorough.
Henry Minute
If you open a can of worms, any viable solution *MUST* involve a larger can.
|
|
|
|
|
how to read or write to xml file?
|
|
|
|
|
There are many ways to do it.
You can use XmlTextReader, XmlNodeReader for reading the XML.For,writing ,you can use XmlTextWriter and XmlNodeWriter classes.There is also XmlDocument class,you can use for reading and writing purpose.
Check it[^]
Cheers!!
Brij
|
|
|
|
|
|
hi guys,
i want to know how i can check the <code>validate </code>of the following schema , i test it in this site http://www.validome.org/grammar/ but give me error,so what is the steps to validate this doc ?
====================================================
An xml Schema:
====================================================
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified"
<xs:element name="note">
<xs:complextype>
<xs:sequence>
<xs:element name="to" type="xs:string" />
<xs:element name="from" type="xs:string" />
<xs:element name="heading" type="xs:string" />
<xs:element name="body" type="xs:string" />
</xs:sequence>
</xs:complextype>
</xs:element>
</xs:schema>
=================================================
A Reference to an XML Schema
=================================================
<note>
xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com note.xsd"
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
<div class="ForumMod">modified on Wednesday, January 7, 2009 9:12 AM</div>
|
|
|
|
|
Honeyboy_20 wrote: i test it in this site http://www.validome.org/grammar/ but give me error
What was the error?
How on earth do you expect anyone to help you without full information?
Henry Minute
If you open a can of worms, any viable solution *MUST* involve a larger can.
|
|
|
|
|
Hi,
I need to pass Html code in one of the xml tags but i am having a problem when trying to parse the xml code. I tried replacing the < and > with & lt; and & gt; (with no spacing) but all in vain. I am parsing the code with javascript functions. Does anyione a way by which i can solve this problem please? Thanks for your time
|
|
|
|
|
Use a CDATA section
only two letters away from being an asset
|
|
|
|
|
Hi,
I am trying a sample program...to create source code from a simple flow chart prepared in visio(not UML models). Please give me any ideas, to start it or let me know are there any tools available to do my job.
Thanks in advance
By,
sree
sree
|
|
|
|
|
hi ,
i want to understand the contents of schema ?
Code:
<schema xmlns=""http:
targetNamespace="http://www.example.com/name"
elementFormDefault="qualified">
<element name=""name""></element>
i know why i use namespace "xmlns=”http://www.w3.org/2001/XMLSchema" but what is this mean "xmlns:target=”http://www.example.com/name”" and what is targetNamespace and the difference between it and normal namespace ? and also what is mean by "elementFormDefault=”qualified”" i read that u can modify the default specifying how element should be qualified but i can not understand what is the effect of it if i add it in my schema? plz give me simple explain if u can help me.
|
|
|
|
|
|
Happy New Year,
Strange one to start the year off, any help would be appreciated.
I have a Winform Project calling a web service. passing in an XML string.
When I pass through my XML to the webservice, it works fine and gets inserted into the dataset without a problem, however as soon as I include an email address within the XML the dataset does not create correctly?
Dim strXML As String = "<parameters><parameterline><details><machineid>Pal0066</machineid><printer>Printer1</printer><username>TomUser</username>"
strXML &= "<reportname>CanteenBilling</reportname><receiptmethod>Email</receiptmethod><format>PDF</format>"
strXML &= "<emailto>email@problemishere.co.uk</emailto><emailcc></emailcc><emailbcc></emailbcc><emailsubject></emailsubject>"
strXML &= "<emailbody></emailbody></details><reportparameters><location>1</location></reportparameters></parameterline></parameters>"
ConvertXMLIntoDS(StrXML)
Private Function ConvertXMLIntoDS(ByVal strXML As String) As Data.DataSet
Dim ds As New Data.DataSet
Dim reader As System.IO.StringReader
Try
reader = New System.IO.StringReader(strXML)
ds.ReadXml(reader)
ConvertXMLIntoDS = ds
Catch ex As Exception
'RunReports.AddLog("ConvertXMLIntoDS - Error")
'RunReports.AddError(ex, methodBase.Name)
Finally
If Not IsNothing(ds) Then
ds.Dispose()
ds = Nothing
End If
If Not IsNothing(reader) Then
reader.Dispose()
reader = Nothing
End If
End Try
End Function
|
|
|
|
|
tomkettering wrote: the XML the dataset does not create correctly?
"does not create correctly" means what?
The following C# produces the email address as expected.
string sxml = "<root><mail>hello@mymail.com</mail></root>";
DataSet ds = new DataSet();
ds.ReadXml(new System.IO.StringReader(sxml));
Console.WriteLine(ds.Tables[0].Rows[0].ItemArray[0].ToString());
led mike
|
|
|
|
|
|
hi all
I want to generate the .xsd for xml document
the format of xml would be say
<menu>
<mainmenu>
<childmenu> ///optional 0 to n
<submenu />
.
.
.
<childmenu>....
</childmenu>
<submenu>
.
.
.
</submenu></childmenu></mainmenu>
.
.
.
.
</menu>
|
|
|
|
|
There is a tool "XML Schema Definition Tool as xsd.exe" provided by the microsoft with its SDK.You can found it at "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin".It can generate schema of a xml file and a lot more.
just give this command with your xml file and outfile directory.It'll generate the schema file of your xml.
To know more Click here[^]
Cheers!!
Brij
|
|
|
|
|
Hai all,
i am developing an application which is used to create Xml document depend upon input given by user, in C#.My application contains datagridview and one of its column name is "text".
After creating xml,my xmldocument looklike
<text>
<strong>What Tools Will I Need?</strong><br />* 3/8-drive socket set<br />* 3/8-drive SAE deep-well sockets<br />
</text>
But i need it in THIS format
<text>
<![CDATA[ <strong>What Tools Will I Need?</strong><br />* 3/8-drive socket set<br />* 3/8-drive SAE deep-well sockets<br / ]]>
</text>
if anybody know ,help me
|
|
|
|
|
hi,
i want to know what is the problem if i do not used the DTD in my xml document, i want example in real world ?
when i use DTD and Schema ?
|
|
|
|
|
|
Hi.
I know there must be many ways to skin this cat, but I've invested a little time in xflat and I was wondering if someone has the experience to point out what I'm doing wrong?
if someone else knows a better/simpler way to convert the data from flat file to xml I'd appreciate a suggestion also.
thanks
Jeff
My flat file data format consists of records that are pipe delimited
and all start with a 2 digit code, here is what 2 files might look like:
file1
05|vendor1code|vendor1desc|vendor1code2
05|vendor2code|vendor2desc|
05|vendor3code|vendor3desc|vendor3code2
05|vendor4code|vendor4desc
05|vendor5code|vendor5desc|vendor5code2
10|AA000222|NULLSERVER|D: |\otherdir\information\AA000222\
22|part9100|HANDLE|XX00|internalnum3|SMALL HANDLE|0
22|part44|GINORMOUS LEG|AA00|||0
file2
05|vendor1code|vendor1desc|vendor1code2
05|vendor6code|vendor6desc|
05|vendor9code|vendor9desc|vendor9code2
10|XY000034|NULLSERVER|C: |\mydir\information\XY000034\
22|part0100|ROTOR|XX00|internalnum12|big ROTOR|1
22|part100-7|BIG FRAME|XX00|||0
The first part of my 'real' data file is like this:
05|CH07|CHICAGO RAWHIDE|
05|XD00|XOULD|
05|XP00|XOULDS SUMPS|
10|XY000034|NULLSERVER|C<code>: </code>|\mydir\information\XY000034\
22|part0100|ROTOR|XX00|internalnum12|big ROTOR|1
22|part100-7|BIG FRAME|XX00|||0
and my flat xfl file (the schema for xflat input) is like this:
<br />
<?xml version='1.0'?><br />
<XFlat Name="navigator_mld_schema" Description="Schema for mld flat file"><br />
<SequenceDef Name="manuals" Description="Manual MLD flat file"><br />
<ChoiceDef Name="import_record" Description="Import Data Of One Record Type" MinOccur="0" MaxOccur="11" MapToXml="No" ><br />
<RecordDef Name="oem_05" FieldSep="|" RecSep="\N"><br />
<FieldDef Name="order_code" DataType="Integer" ValidValue="05" MapToXml="No" NullAllowed="No"/><br />
<FieldDef Name="vendor" MapToXml="No"/><br />
<FieldDef Name="description" MapToXml="No"/> <br />
</RecordDef><br />
<RecordDef Name="location_10" FieldSep="|" RecSep="\N"><br />
<FieldDef Name="order_code" DataType="Integer" ValidValue="10" MapToXml="No" NullAllowed="No"/><br />
<FieldDef Name="manual" MapToXml="No"/><br />
<FieldDef Name="server" MapToXml="No"/><br />
<FieldDef Name="drive" MapToXml="No"/><br />
<FieldDef Name="path" MapToXml="No"/> <br />
</RecordDef><br />
<RecordDef Name="mfgrpart_item_22" FieldSep="|" RecSep="\N"><br />
<FieldDef Name="order_code" DataType="Integer" ValidValue="22" MapToXml="No" NullAllowed="No"/><br />
<FieldDef Name="part" NullAllowed="Yes" MapToXml="No"/><br />
<FieldDef Name="partdescription" NullAllowed="Yes" MapToXml="No"/><br />
<FieldDef Name="vendor" NullAllowed="Yes" MapToXml="No"/> <br />
<FieldDef Name="item" NullAllowed="Yes" MapToXml="No"/><br />
<FieldDef Name="description" NullAllowed="Yes" MapToXml="No"/><br />
<FieldDef Name="stocked" MapToXml="No" /><br />
</RecordDef><br />
</ChoiceDef><br />
</SequenceDef><br />
</XFlat><br />
==========================================
When I run xflat I get this:
Licensed copy of XML Convert 2.2.
Copyright (C) 1999 - 2007 Unidex, Inc. All rights reserved.
You may use this software only if you have read the license agreement
and accept its terms.
For more information, please visit http://www.unidex.com/.
Error parsing the flat file.
Description: Unrecognizable record.
The error occurred in file:/C:/Downloads/Utilities/XQuery/XMLConvert/xmlconvert/testdata/gp000034.dxx at record number 1.
The character offset of this record (from the beginning of the file) is 1.
The bad record begins with:
05|CH07|CHICAGO RAWHIDE|
05|XD00|XOULD
I dumped the data file to make sure there were really 13 10 line feeds at the end of each line, so I'm not sure what could be going wrong.
thanks alot
Jeff
|
|
|
|