|
The encoding attribute in the XML processing instruction is to indicate the encoding of the document, so it is likely that the document you are creating is not in that encoding hence the error. To check this look at the xml file you are creating in a hex editor, in utf-16 there are (at least) two bytes per character...
|
|
|
|
|
|
Hello,
Greetings!
I'm trying to make a sample app in VC++ 6.0 to prepare and send a SOAP message to a webserver. I'm using gSOAP Toolkit 2.3 (http://www.cs.fsu.edu/~engelen/soap.html[^]) for the same at the client end, while I have "Windows 2000 Pro/Apache v1.3/PHP-4.3/NuSOAP.php" on the test server end. (Yeah, it is not a Win2K Server, but it is a Professional version of Win2K!)
Any idea about how to make and use the namespace file at the client end?
The documentation (UserGuide) is not quite helpful!! ... So if you have used a similar kind of setup, and can reply back, I would be grateful.
Thanks,
Rgds,
Nirav
---------------------------------------------------
* Don't wish it was easier; Wish you were better! *
---------------------------------------------------
|
|
|
|
|
Hi,
I got the solution with some trial and error...
Thanks anyway!
If anybody needs help on this, please let me know!
Thanks,
Rgds,
Nirav
---------------------------------------------------
* Don't wish it was easier; Wish you were better! *
---------------------------------------------------
|
|
|
|
|
I create dynamic xml document with dom.The xml seem
<record>
<a>fasfd</a>
<b>fdasfas</b>
<record>
or
<record>
<b>fasf</b>
<a>fdsfs</a>
</record>
or
<record>
<a>fds</a>
<a>fsfsfsfd</a>
<b>232432</b>
<a>werwrw</a>
<record>
how do i specify the order? the complexType must is: sequence or choice or all,but these don't apply my xml doc. Have there a way that don't need specify order?
linjie
|
|
|
|
|
Use a repeating choice ordering group, eg for you examples
<complexType>
<choice maxOccurs="unbounded">
<element name="a" type="string"/>
<element name="b" type="string"/>
</choice>
</complexType>
|
|
|
|
|
Thanks very muth,My problem has be solved.
linjie
|
|
|
|
|
1.I create a xml document with dom. I want specify a schema to the xml document? how do i do?
2.The xml document created by dom isn't a formated document,e.g
<record>sdafs</record><record>fsdfsdfa</record>..............
are there a way to format it for newline and indenting?
linjie
|
|
|
|
|
I hope this provides some clarity:
Create a schema for your example document (snippet), which I formatted as follows:
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\...\record.xsd">
<record>sdafs</record>
<record>fsdfsdfa</record>
</ROOT>
The schema reference has been inserted as a noNamespaceSchemaLocation, in this example the XSD schema located somewhere on your local drive, eg c:\.
The schema, which I created with XMLSpy, may look something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSPY v2004 rel. 2 U (http:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="ROOT">
<xs:complexType>
<xs:sequence>
<xs:element name="record">
<xs:complexType/>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Validating the XML document will now happen against the XSD schema. An XSLT transform may be applied to render it in a browser.
|
|
|
|
|
thanks,but how do i do it with dom? I has created a schema for the xml documnet, I used following code
pRootElement->setAttribute(CComBSTR("xmlns"),CComVariant("http://www.myweb.com/mySchema.xsd"))
but all node has a excrescent attribute,e.g
<?xml version="1.0"?>
<ROOT xmlns="http://www.myWeb.com/mySchema.xsd">
<record xmlns="">sdafs</record>
<record xmlns="">fsdfsdfa</record>
</ROOT>
linjie
|
|
|
|
|
Your problem seems to be with setAttribute or the use of CComBSTR.
Not too sure, but try these out:
setAttribute
CComBSTR
|
|
|
|
|
Hi, I'm new to xsl and am I'm just trying to pass an asp session variable into my xsl to include into a form that will be mixed with some xml data.
I've tried using both the addparameter and addobject methods (i.e. something like:
------------------------------------------------
XSL1.addParameter session("ID"), sessionID
-------------------------------------------------
and I can't get either one to work. There has to be something I'm missing here, but for the life of me I can't seem to figure out what it is.
My code is as follows....
-----------------------------------------------
'Load XML from file
Set XML1 = CreateObject("MSXML2.DOMDocument.3.0")
XML1.async = False
XML1.Loadxml availresponse
'Load XSL from file
Set XSL1 = CreateObject("MSXML2.DOMDocument.3.0")
XSL1.async = False
XSL1.Load server.MapPath("availrooms.xsl")
-----------------------------------------------
...then later in the script I do the transform with the following line:
-------------------------------------------------
<td> <%= XML1.transformNode(XSL1)%>
-------------------------------------------------
Any help would be greatly appreciated!
|
|
|
|
|
Another one,
Now the guy that was suppose to create an XSL for me, "fixed" my html to look like the print, which doesn't help me much....
How do I make the text fit the shape????
How do I change the font size?
How do I center the text in the shape?
I tried to understand the examples all the sites give, but nothing works.
Please, can you help?
Thanks,
Cgull
|
|
|
|
|
You stated in your last post that you don't know anything about XML, HTML (not necessarily related to XML, BTW), or VML. That would definitely be the first place to start. Pick up a good book or hop over the W3C and start reading specs.
Even though you've stated your problem in the most vague way immaginable, you haven't stated what is wrong exactly - most likely because you're not even sure where the problem lies. Without knowing something more, it is hard to help you with problems like this.
A development community such as this one can't - and isn't designed - to teach you everything. You should at least have some working knowledge of what you're getting into. If you don't understand anything about XML or VML, we can't necessarily teach you. There are articles on CP that can help, but developing a working knowledge is important before using the forums - they're for helping with a problem when people were stuck.
Even if you could tell us in technical terms what the problem is (and you didn't even give a code fragment or example - and don't post the whole file please), could you necessarily understand the answer? You'd best learn your subject matter to some degree first.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Wow, if words could kill...
I did try to add example, but it didn't go through.
I did go to W3C site, but the exapmles there didn't help me much.
When I'm trying to fit a text into a shape, whatever I do does not work.
If I try to change the font size, also does not work.
e.g.
<v:textpath style="v-rotate-letters: true; font-size: small" fitshape="true">
<v:textbox style="v-text-anchor: top">3086-UNKNOWN CHEQUE MATCHING
Whatever I did inside the textpath or the textbox, the text stayed the same.
No change of the font size, rotation, middle-center or any other attribute I tried.
|
|
|
|
|
Hello good people,
I'm tring to write something in VML for the first time.
The script I created looks great on Microsoft VML Generator, I saved it as HTML, and opened it with Explorer, and still looks great, but when I print it, the lines move and it's not so great anymore.
Have to say, I know nothing about XML, HTML or VML and I don't know what am I doing wrong.
I also tried to use some examples from the net, on the VML generator, and none of them work.
Why, why, why?
Please help,
Thanks,
Cgull
|
|
|
|
|
|
Hi,
i'm using VS.net 2003 with .NET Framework 1.1. I'd like to use signedXML in the Namespace System.Security.Cryptography.XML. But when i'm trying to include (with "using") the namespace in C#, the only namespace VS.net displays under System.Security.Cryptography is X509Certificates.
Where is the XML Namespace?
Can someone please help me and tell me how to solve this problem?
Thanks
Obi
|
|
|
|
|
You have to reference the System.Security assembly that contains the classes in the System.Security.Cryptography.Xml namespace. Just like in C/C++ you can't call a function without it being linked to the DLL in which the function is defined.
Also, you may want to take a look at the article I finished writing a while back at http://www.codeproject.com/dotnet/xmldsiglic.asp[^]. You may find it helpful.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hey thanks a lot! I'm just a starter in C# and was not aware where to reference to dll's.
It solved my problem. Thanks again
|
|
|
|
|
how to serialize/deserialize derived class between two application? here is the situation:
class container
{
BaseClass bc;
}
class BaseClass
{..}
class DerivedClass1:BaseClass
{...}
class DerivedClass2:BaseClass
{...}
------------------------------------------
the "bc" in the container can be assigned to be DerivedClass1 or DerivedClass2. Those classes and serialize/deserialize functions will be use between two applications (App1, App2). App1 serialize "container", App2 try to deserialize "container".
I tried following ways:
1. Binaryformatter/Soapformatter: During the serialization, App1's name will also be serialized. When App2 try to deserialize, it can not find App1 and generate exceptions.
2. XmlSerializer: it can not serialize when "bc" is assgined to a class other than BaseClass
Any guru have any good method to handle this situation?
Thanks,
Leo
|
|
|
|
|
Hi Folks,
I am trying to start a project to describe my country as an XML file.
I have made a start at http://www.latedecember.com[^]
Also have an XSL underway - not online yet.
I am fairly new to XML so any feedback or ideas would be greatly appreciated. If anyone wants to join in with a .xml for your country please get in touch.
Davy
My Personal Blog - Homepage. Scottish News - Angus Blog, Perth Blog and Dundee Blog
|
|
|
|
|
Maybe this is just personal preference, but I cringe when I see this:
<cities>
<city>
<name>Aberdeen</name>
</city>
<city>
<name>Dundee</name>
</city>
</cities>
All those nested tags are really hard to read (and make for more complex parsing code). I would write it as:
<cities>
<city name='Aberdeen' />
<city name='Dundee' />
</cities> Free-form and/or long text descriptions can go in their own tags, such as country/filemeta/about or country/history/event/summary
But I like your idea, if enough folks join in, the result could be an encyclopedia in XML.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
CP SearchBar v2.0.2 released
|
|
|
|
|
Thanks Mike - your input is very helpful. I was thinking that I was not taking advantage of attributes. Once I get a sample XSL online (important for people to see a sample output), I'll look again at the structure.
Michael Dunn wrote:
if enough folks join in, the result could be an encyclopedia in XML.
Yeah it has potential - the format and XSL is for any country so it would be nice to cover more that Scotland.
Davy
My Personal Blog - Homepage. Scottish News - Angus Blog, Perth Blog and Dundee Blog
|
|
|
|
|
I've just posted a couple of additions for you (SMG newspapers).
Have you thought about how you'll deal with aggregating data if you get a lot of submissions?
|
|
|
|