|
Thanks for that paul. Got it up and running in less than 5 minutes.
Cheers
James
|
|
|
|
|
my hero.
but a vb link - oh the dark side of the force
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Philip Fitzsimons wrote:
but a vb link
LOL Well the site is called VBXML but what VB and XML have to do with each other I don't know. Anyway
Paul Watson Bluegrass Cape Town, South Africa Colin Davies wrote:
...can you imagine a John Simmons stalker !
|
|
|
|
|
Paul Watson wrote:
LOL Well the site is called VBXML but what VB and XML have to do with each other I don't know.
It is just marketing to make comfortable those who do not wish to think still come. http://www.topxml.com[^] also works to those who do think.
"I will find a new sig someday."
|
|
|
|
|
Am encountering the following problem.
in my xml doc, there is elment as such:
<COMMAND function="Write"><![CDATA[$:set:mode EG]]></COMMAND>
the corresponding autogen xml schema from VS.NET returned
<xs:element name="COMMAND" minOccurs="0" maxOccurs="unbounded" >
<xs:complexType>
<xs:attribute name="function" form="unqualified" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
my understanding is the CDATA tag is asking the xml parser to ignore what is enclosed by the CDATA tag. By the same token, i would think the xml schema should also ignore the element value of COMMAND.
well, I isolated the xml schema validation is failing at this point. How should the xml schema really be to handle CDATA?
thanks,
huikm
|
|
|
|
|
Our app transforms xml data with xsl into html.
I use &#160;&#xD;&#xA; (space, carriage return, line feed) to separate data on different lines that eventually is displayed on an excel spreadsheet. After each line is a square that is undesirable.
Can anyone please tell me how to get rid of this square or how to display a line feed without it?
Thanks,
Lilian
|
|
|
|
|
this is realted to either:
&nbap;* your character encoding in your xslt
* or the fact that excel is not recognising the line feed - try missing out the line feed.
hope this helps.
|
|
|
|
|
After I retrieve the transformed CComBSTR that is produced with XML and xsl, I wrote code to parse through the wstring to replace the CRLF with a \n. I guess Excel didn't like what xsl did to it.
Lilian
|
|
|
|
|
A long time ago, I found an article on MSDN that had all the info for what version of the MSXML parser was included with what version of IE. Does anyone have a referece such as this? It was something as simple as:
IE v4.0 contains MSXML2
IE v4.1 contains MSXML2
...
IE v6.x contains MSXML3 (???)
Writing an app and if I know what version of XML was included with what version of IE (which is the standard browser), I know where to start. Know I'll need this in future apps.
Thanks!
AC
-AC
|
|
|
|
|
The KB article written for you[^]
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
YOU ARE THE MAN! I'm sending you a fruitcake this year!
-AC
|
|
|
|
|
Andrew Connell wrote:
I'm sending you a fruitcake this year!
Aaarrgghh, poor chap. You are supposed to reward people for helping you, not subject them to the horrors of the *eery eye twitching music maestro* The Christmas Fruit Cake *crash of lightining, womens scream, eye of knewt, wing of bat...*.
Actually so long as there is no more than a milimetre of marzipan on the damned thing, I like fruit cakes (no, not those kind of fruit cakes all you sickos... I mean the one your auntie gives you and your mom keeps you away from in case you actually try to eat it! Most end up as doorstoppers or as "next years christmas" gifts)
Paul Watson Bluegrass Cape Town, South Africa Ray Cassick wrote: Well I am not female, not gay and I am not Paul Watson
|
|
|
|
|
Paul Watson wrote:
no, not those kind of fruit cakes all you sickos
Hahaha, nice touch. Now I just need to find my info on each of the parsers (which one has the flaky XSL parser).
-AC
|
|
|
|
|
Could someone please look at the following code and tell me why I get the error below.
Sorry for the length of code.
=====ERROR on Page ======
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'child.Text'
/council_services/data/wastedata.asp, line 60
The error occurs no matter which field I choose from the database recordset.
Now the same code works fine with another database I used for testing, but not this one.
Please help.
=====END ERROR =====
Within the following code.
=====CODE=====
<%
'------------------------ DATABASE CONNECTION -----------------------------------------
'The database connection is done through the include file above.
'------------------------ XML DOM OBJECT CREATION ------------------------------------
'Create XMLDOM Object
Dim xmldoc
Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")
'------------------------ BULK OF XML CODE ------------------------------------------------
If (xmldoc.childNodes.length = 0) Then
' Build the XML document, and asign the root node.
Set root = xmldoc.createNode("element", "council_services", "")
xmldoc.appendChild (root)
' Queries the database for customer data, this will be referenced later.
' Use recordset(0) where 0 is the order of the datafield of the recordset.
Sql = "SELECT StreetName, Area, Round, Day FROM WasteCollection"
Set rs = conn.Execute(Sql)
If Rs.eof or rs.bof then
'If there are no results from the search criteria, then put the following text
'onto the page
Response.Write " " & "There are currently no information available, please try again." & " "
Else
rs.MoveFirst
'Loop through the recordset
Do While Not rs.EOF
Set onode = xmldoc.createNode("element", "Waste", "")
xmldoc.documentElement.appendChild (onode)
'The following code, sets the child elements of the recordset
'to the xml data page.
'Set child = xmldoc.createNode("element", "CollectionStreet", "")
'child.Text = rs.fields(0)
'onode.appendChild (child)
'Set child = xmldoc.createNode("element", "CollectionArea", "")
'child.Text = rs.fields(1)
'onode.appendChild (child)
'Set child = xmldoc.createNode("element", "CollectionRound", "")
'child.Text = rs.fields(2)
'onode.appendChild (child)
Set child = xmldoc.createNode("element", "CollectionDay", "")
child.Text = rs.fields(2)
onode.appendChild (child)
rs.movenext
Loop
Set rs = Nothing
'Save the XML doc, this will be saved to the folder which contains the asp pages.
xmldoc.save server.mappath("wastedata.xml")
'--------------------------- DISPLAY THE XML DATA ---------------------------------------------
' Linking XML and XSL together
sourceFile = Server.MapPath("wastedata.xml")
styleFile = Server.MapPath("wastedata.xsl")
'Create the microsoft DOM object for both source and style (xsl) pages.
set source = Server.CreateObject("Microsoft.XMLDOM")
source.async = false
source.load(sourceFile)
set style = Server.CreateObject("Microsoft.XMLDOM")
style.async = false
style.load(styleFile)
Response.Write source.transformNode(style)
End If
End If
=====END CODE=====
The four fields form the database are all Varchar.
I would much appreciate some response to the about please.
Gazzer.
|
|
|
|
|
Hi,
I have converted a delimited text file to a DataTable and added to a new DataSet. I will add more than 1 table to this DataSet.
Then my next task is to convert these tables into serveral xml files.
For example, for the Category Table, I will have to make an xml file which contain datas where category num < 1000, and another xml file which contain datas where category num > 1000. However, since the WriteXml only belongs to the DataSet Object, but not the DataTable object, how do I do this????? ??????
Please help meeeee!!!!
|
|
|
|
|
I'm not sure - are you asking how to write an XSL sheet to return the XML you want from the master document ? If not, this question would be better asked in the C# forum, because it relates to the .NET framework, more than XML itself.
Not wanting to be picky, it's just that, well, if you look at how many posts this forum has had, and how many the C# forum has had, you do the math. You'll get more airplay there if you're asking what I think. If you want to create an XSL, that's another matter, just say so and provide some sample XML and I'd be happy to help. I don't know the answer if the question relates to using ADO.NET components to extract a subset of the data as XML.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Oh, thank you Christian!
I guess you are right! I should have posted this message to the ADO.NET one!
How about a question like this: How to get a subset from an xml?
Example:
The spreadsheet table is like this :
Category | SubCategory | AttributeName
----------------------------------------
Ottawa Tables Dimensions
Ottawa Chairs Weight
Alberta Tables Dimensions
Kingston Tables Dimensions
Alberta Chairs Weight
Right now I have an xml file which contains all the above datas.(It's a bit long, so I didn't type it out).. What I want to do is to make a new xml file named: Ottawa.xml where it only contains the following:
<Datas>
<Entry>
<SubCategory>Tables</SubCategory>
<AttributeName>Dimensions</AttributeName>
</Entry>
<Entry>
<SubCategory>Chairs</SubCategory>
<AttributeName>Weight</AttributeName>
</Entry>
</Datas>
Is there any possible way??? Please???
Karen
|
|
|
|
|
Write an XSLT. One of the best ways to extract and transform XML is to write an XSLT. You can then apply the xslt to the XML and get the resulting XML.
If you need help with the xslt, you will need to post a sample of your XML. Its really simple though.
|
|
|
|
|
Is it possible to serialize an Exception derived class? When I try to add an exception to a System.Messaging.Message object (which internally serializes the object to XML) I receive the following error:
System.InvalidOperationException: There was an error reflecting 'Send.DALException'. ---> System.InvalidOperationException: The property 'Source' on type 'System.Exception' cannot be serialized because it is decorated with declarative security permission attributes. Consider using imperative asserts or demands in the property accessors.
What does this mean? Can I get around it?
|
|
|
|
|
Hi,
I have a small project: I have an XML file as input, and I need to find certain "tokens" inside it. For example, I need to find all of the "Prop1" properties (and their values), inside all "TAG1" tags:
<tag1>
..
Prop1=value1 <<-- I need to find this
..
I have no idea how to work with XML. Also, I'm looking for sth that works on NT4.0 sp5 without the need to install anything. Where do I start?????
Thanks.
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
sagmam wrote:
Where do I start?????
Here[^].
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
sagmam wrote:
Also, I'm looking for sth that works on NT4.0 sp5 without the need to install anything.
I dunno if you're going to find that, you probably need the Microsoft XML stuff installed. I could be wrong about that, but certainly your starting point is XSL, the language used to generate a document from input XML. I should probably do some articles, but either way, there's plenty of info on the web.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
A few questions.
What do you mean by properties. In XML you can have child elements
<Tag1>
<ChildElement> data </ChildElement>
</Tag1>
or Attributes of an element
<Tag1 childattribute="data"/>
Second. Can you clarify what you mean by without installing anything?
If you mean not installing any dll's (i.e. not updating the MSXML updates) only, that is quite different than anything. i.e. if you have a code only solution you still need to install it.
I will assume you mean the first case, so code only is ok.
If that is correct my code found here at
http://www.codeproject.com/soap/xmlmabparser.asp (sorry no clickty with html turned off for XML sample.)
can be edited to not include the MSXML parsing feature and use only an internal parser. The internal parser is about 1/10 th as fast though and please read my caveats on how text blocks are handled.
From there it is just a matter of stepping through the child elements of all elements looking for the data sets you wish, via the first/next child element functions.
|
|
|
|
|
I meant the attributes. At least, this is what I need at the moment.
I'll look into it, thanks.
|
|
|
|
|
How can i transform following XML file:
<br />
<data><br />
<item name="One" /><br />
<item name="Two" /><br />
</data><br />
to something like this:
- One
- Two
?
(i do not know how to get value of name in item)
Thank you
|
|
|
|