|
I think you should try using VARIANT_FALSE instead of just "false", and I believe to load an XML document you should use "load" instead of "loadXML".
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
I am making XML comments with the Build Comment Web Pages tool is VS Studio .NET 2003. When a <see cref="xxx"> tag is used it appears in the HTML created by the tool in the xxx.html file but is not rendered by my IE6 browser.|
Any clues? ...
Gary Hyslop
|
|
|
|
|
Post a small demonstration of the output and I'll look at it.
--
Aaron Eldreth
|
|
|
|
|
The following is an exerpt of the HTML produced by the "Build Comment Web Pages" tool in VS Studio.NET 2003:
<title>ZedGraph.CurveItem
...
This class contains the data and methods for an individual curve within
a graph pane. It carries the settings for the curve including the
key and item names, colors, symbols and sizes, linetypes, etc.
The array of independent (X Axis) values that define this
<see cref="CurveItem">.
The size of this array determines the number of points that are
plotted. Note that values defined as
System.Double.MaxValue are considered "missing" values,
and are not plotted. The curve will have a break at these points
to indicate values are missing.
When I display this HTML with my IE6 browser the "<see cref="CurveItem">" tag is not rendered.
Thanks for your help
Gary Hyslop
|
|
|
|
|
I want to create a XSLT file in C#.NET manually.I mean that according to the user choice ,XSLT file will be created in background.But I know that there is not any class like XmlDocument,XmlTextWriter,XmlTextTeader for XSLT Document.How can I create this document?Should I use to File I/O class and how?I am waiting for your help...Thanks a lot...
|
|
|
|
|
an XSLT file is just a normal xml file in a different namespace (http://www.w3.org/1999/XSL/Transform) so you can use any of the Xml classes to create it
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
What is the difference between <xsl:include> and <xsl:import>?
|
|
|
|
|
|
I have the following xml:
<configuration>
<configObj>
<name>aaa</name>
<value>1234</value>
</configObj>
<configObj>
<name>bbb</name>
<value>5678</value>
</configObj>
</configuration>
I know the expression to get all the values, but I need to get for example the value for name aaa, is there an Expression string to do this?
Thanks in advance!
Cristina
|
|
|
|
|
This should do the job:
/configuration/configObj[name='aaa']/value
Select the correct configObj with the predicate name='aaa' , then select the child element you want.
HTH.
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
I have a problem about my Project.I want to ask about that.I am trying to build an application that you can transform a xml document into another xml document with drag-drop elements of the source xml document into the elements of the target xml document.Stylus Studio Editor has this kind of property called XSLT Mapper.When you drag an element into target element xsl source code is created below side of the window.I want to develop this kind of application.
But I could not have found what i should do.Could you help about this application?How should I develop this program and which properties of .NET I should use?
Thanks for a lot...
|
|
|
|
|
can marquee tag used in html can also be used in WML? or in XML??? or any other tags can be used for instead????
|
|
|
|
|
The Marquee tag can be used in XML, however, it does not scroll the contents like the marquee tag in HTML. Remember that XML only holds data, it is up to the application to determine how to read/display it.
--
Aaron Eldreth
|
|
|
|
|
I am using DOM parser to read an XML file but i am unable to read the XML file when it is in indented form.
Using the javax.xml.transform.Transformer i can write the XML file in indented form but can't read it in indented form.please tell me where i m lacking.
sangi2007
|
|
|
|
|
Hi
Can anyone tell me
HOW CAN I SAVE A PICTURE FILE OR PICTUREBOX.IMAGE IN XML FILE IN VB.NET?
i must save my form and all it's component in XML format and then again create my form by using my xml file. how can i do this and save image in picturebox on my form?
Best Regards
M.Khayatan
MkhProgrammer
|
|
|
|
|
Save it as a base64 encoded string.
Ryan
Ryan.
It's yet another shock to our system to discover that not only are we not the centre of the Universe and we're not made of anything, but we started out as some kind of slime and got to where we are via being a monkey. It just doesn't read well.
Douglas Adams
|
|
|
|
|
Hi,
that is nasty. IMHO you should only refer to picture file in XML instead of inserting binary file into XML, since it is text format.
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Hello,
I am trying to read a XML file which has japanese characters -- The XMPL processor I am using is LIBXML2.
The XML file I am trying to read is as follows:
<><<response result="failure" loglevel="5" cname="recognizeversion" csever="10.5" addn="abc" focusbrowser="true" iid="1480" cse="SolidWorks" ver="10.5">><<info>><<reason>>ãƒãƒ¼ã‚¸ãƒ§ãƒ³èªè˜ã¯ãƒ¦ãƒ¼ã‚¶ã«ã‚ˆã£ã¦ãƒãƒ£ãƒ³ã‚»ãƒ«ã•ã‚Œã¾ã—ãŸ<><><>
Note, that the junk characters above are the japanese characters. If I save this file and open in IE then the characters are displayed in Japanese.
I using the following code to read the japanese character as contained in the <response>.<info>.<reason> section.
xmlChar * xmlStr = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
CString xx = xmlStr;
AfxMessageBox(xx);
The above messagebox shows junk characters. I want it to display it as is visible in the IE.
Where am I doing the things wrong.
Thanks in advance.
Regards,
Amol
|
|
|
|
|
- Are you using a Unicode build? If not, CString will interpret xmlStr as ASCII characters, resulting in what you've got there.
- Even if you've got a Unicode build...you're not telling anything that xmlStr is UTF-8...
You can verify that libxml is reading the characters correctly by using xmllint (it converts the Japanese characters to numeric entities) and looking up the character codes in charmap.
In order to convert the UTF-8 that libxml gives you to (say) UTF-16, you can use code like this:
<br />
const int WIDE_COUNT = 1024;<br />
wchar_t wide[WIDE_COUNT] = {0};<br />
int inLen = lstrlenA(LPCSTR(xmlStr));<br />
int outLen = WIDE_COUNT;<br />
xmlCharEncodingHandlerPtr handler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_UTF16LE);<br />
int nOut = handler->output((xmlChar*)wide, &outLen, xmlStr, &inLen);<br />
This puts the same UTF-16 values in the string wide that xmllint displays as numerical entities.
As to displaying the characters in a message box - I'm afraid I don't know - it'll be character sets again, or fonts, though!!!
HTH
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
Can somebody help me on the article http://www.codeproject.com/miscctrl/cntGroup.asp.
Sample?
Regards,
Rainer
|
|
|
|
|
Hie...
I have a login page using XML to store my UserEmail and UserPass.
Now, I want to verify with the XML, if user type a correct UserEmail and UserPass, then login proceed; if not, message text: This is an invalid Account.
Please help?
Thanks.
|
|
|
|
|
This is my first .Net application so i appologise for my stupidity. What the application is, is a navigation control for an intranet that a colleage has been building. It uses a .Net component (ASP.NET DHTML Menu)
http://www.apnsoft.com/?L=E&LM=Menu_Main&MD=Menu_Features
which uses strong xml.
My task has been to create an app to edit this xml in .NET. So i have set about learning all i can about how (the #uck) to do this ... here is a little drawing of what i have come up with:
www.elevatordigital.com/images/myplan.gif
My question is is it possible to take the stream created with the SqlCommandClass directly to the xml file main.xml?
Any help with this would be greatly appreciated. Im slightly out of my depth with this project so if anyone thinks there is a better way of achieving this i would love to hear about it.
Cheers
Kate
|
|
|
|
|
I have created a datagrid to edit the SQL database and a page which has the following code onLoad:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Load proper XML from SQL Server
Dim strConn As String = "My Connection String is Here"
' Define the XML command
Dim cmd As SqlXmlCommand = New SqlXmlCommand(strConn)
' Set up a SqlXmlCommand from a xml template using FOR XML EXPLICIT
cmd.CommandType = SqlXmlCommandType.Template
cmd.CommandText = Server.MapPath(@"template.xml");
cmd.BasePath = Server.MapPath(@"\");
' Specify a root element for the result
cmd.RootTag = "menu"
' Read the XML into an XmlReader
Dim xr As XmlReader = _
cmd.ExecuteXmlReader()
' Transfer it to an XmlDOcument
Dim xd As XmlDocument = New XmlDocument
xd.Load(xr)
xr.Close()
' Get a Transform ready
Dim xslt As XslTransform = New XslTransform
xslt.Load("main.xslt")
' Use the transform to rewrite it
Dim ms As MemoryStream = New MemoryStream
xslt.Transform(xd, Nothing, ms)
Dim mywriter As System.Xml.XmlTextWriter
mywriter = New System.Xml.XmlTextWriter("main.xml", Nothing)
With mywriter
.WriteStartDocument()
.WriteString(ms)
.WriteEndElement()
.WriteEndDocument()
End With
mywriter.Flush()
mywriter.Close()
End Sub
But i have got syntax errors at these elements:
1. cmd.CommandText = Server.MapPath(@"template.xml");
2. cmd.BasePath = Server.MapPath(@"\");
3. xslt.Transform(xd, Nothing, ms) - I think this is to do with the memory stream
4. .WriteString(ms) - I think i need to convert the memory steam to a string using Streamreader
If anyone can help me with these problem that would be a grea help
Cheers
Kate
|
|
|
|
|
hi,
yeah I know, too late for help. And i am not even really helpful...
a) since I hate coding in this *pseudocode* (I mean VB) no way how to help with syntax errors
b) why not to try language begining with "C"?
c) how is menu stored in DB? adding separators using xslt sounds little strange to me...
d) IMO there is no way how to directly store sql query result into xml file, since XmlReader is for reading, not for writing. You may want to create e.g XmlDocument and then save it with XmlDocument.Save() to file. You can even insert <separator> tags with XmlDocument.InsertAfter() method. Look for more at msdn.com.
e) I am quite tired so in case I am writing bulls*it, sry.
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Hi,
Ive actually solved the problem now - I ended up creating Custom Classes for the two database tables and writing out the xml using asp.net:
Imports System.Xml
Imports NWDAweb.Classes.newsStories
Public Class PlasmaThanks
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm
Protected WithEvents XMLTextBox As System.Web.UI.WebControls.TextBox
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim newsStoryObjList As newsStoryObjList = New newsStoryObjList
Dim xmlDoc As XmlDocument = New XmlDocument
Dim menuElement As XmlElement = xmlDoc.CreateElement("menu")
xmlDoc.AppendChild(menuElement)
If newsStoryObjList.SelectAll("plasmaScreen = 1", "datePosted") Then
For Each newsStoryObj As newsStoryObj In newsStoryObjList
Dim storyElement As XmlElement = xmlDoc.CreateElement("story")
Dim titleElement As XmlElement = xmlDoc.CreateElement("title")
Dim bodyElement As XmlElement = xmlDoc.CreateElement("body")
titleElement.InnerText = Server.HtmlEncode(newsStoryObj.headline)
bodyElement.InnerText = StripHTML(Server.HtmlDecode(newsStoryObj.bodyCopy))
storyElement.AppendChild(titleElement)
storyElement.AppendChild(bodyElement)
menuElement.AppendChild(storyElement)
Next
XMLTextBox.Text = xmlDoc.InnerXml
XMLTextBox.Visible = False
Dim xmlStreamWriter As System.IO.StreamWriter = System.IO.File.CreateText(Server.MapPath("news.xml"))
Try
xmlStreamWriter.Write(xmlDoc.InnerXml.Replace("&", "&").Replace(vbCrLf & vbCrLf, vbCrLf))
xmlStreamWriter.Close()
Catch
End Try
End If
End Sub
Private Function StripHTML(ByVal strIn As String) As String
Dim pattern As String = "<[^>]*>"
Return System.Text.RegularExpressions.Regex.Replace(strIn, pattern, String.Empty)
End Function
End Class
But thanks for the response
|
|
|
|