Click here to Skip to main content
15,900,461 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralUnable to read japanese character using LIBXML Pin
25-Aug-04 22:46
suss25-Aug-04 22:46 
GeneralRe: Unable to read japanese character using LIBXML Pin
Stuart Dootson26-Aug-04 9:43
professionalStuart Dootson26-Aug-04 9:43 
QuestionArticle help?!? Pin
yourxlife25-Aug-04 2:07
yourxlife25-Aug-04 2:07 
GeneralVerification of Login Page using XML Pin
DotNet24-Aug-04 20:19
DotNet24-Aug-04 20:19 
General.NET newbie has question RE: XmlTextWriter Pin
Member 127129724-Aug-04 1:22
Member 127129724-Aug-04 1:22 
GeneralRe: .NET newbie has question RE: XmlTextWriter Pin
Member 127129726-Aug-04 22:34
Member 127129726-Aug-04 22:34 
GeneralRe: .NET newbie has question RE: XmlTextWriter Pin
DavidNohejl7-Oct-04 10:59
DavidNohejl7-Oct-04 10:59 
GeneralRe: .NET newbie has question RE: XmlTextWriter Pin
Anonymous7-Oct-04 22:51
Anonymous7-Oct-04 22:51 
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 Smile | :)
GeneralRe: .NET newbie has question RE: XmlTextWriter Pin
Anonymous7-Oct-04 22:51
Anonymous7-Oct-04 22:51 
GeneralDatagrid cannot displayed. Pin
DotNet23-Aug-04 3:24
DotNet23-Aug-04 3:24 
GeneralXML navigation help needed Pin
liyang yu22-Aug-04 9:06
liyang yu22-Aug-04 9:06 
GeneralRe: XML navigation help needed Pin
Pradeep Shamarao6-Sep-04 21:53
Pradeep Shamarao6-Sep-04 21:53 
GeneralXml Parsing &amp; Validating Pin
SR7717-Aug-04 10:52
SR7717-Aug-04 10:52 
GeneralRe: Xml Parsing &amp; Validating Pin
David Salter23-Aug-04 4:07
David Salter23-Aug-04 4:07 
GeneralNo correct xhtml from XML and XSL Pin
Gumbah13-Aug-04 0:06
Gumbah13-Aug-04 0:06 
GeneralRe: No correct xhtml from XML and XSL Pin
ChrisAdams15-Aug-04 19:37
ChrisAdams15-Aug-04 19:37 
GeneralRe: No correct xhtml from XML and XSL Pin
Gumbah15-Aug-04 21:01
Gumbah15-Aug-04 21:01 
QuestionPulling Values From An XML File - Recommendations? Pin
Member 66660712-Aug-04 6:11
Member 66660712-Aug-04 6:11 
GeneralEvaluating XPath expressions on Windows CE Pin
Kot_Begemot6-Aug-04 5:52
Kot_Begemot6-Aug-04 5:52 
GeneralRegular Expression of XML document Pin
Rashid_Mehmood5-Aug-04 14:53
Rashid_Mehmood5-Aug-04 14:53 
GeneralRe: Regular Expression of XML document Pin
abu-alSaber16-Aug-04 22:12
abu-alSaber16-Aug-04 22:12 
GeneralMerging of two XML documents Pin
dabs5-Aug-04 7:15
dabs5-Aug-04 7:15 
GeneralRe: Merging of two XML documents Pin
ChrisAdams11-Aug-04 23:49
ChrisAdams11-Aug-04 23:49 
GeneralRe: Merging of two XML documents Pin
dabs12-Aug-04 0:31
dabs12-Aug-04 0:31 
GeneralRe: Merging of two XML documents Pin
Praveen Nayak6-Sep-04 0:11
Praveen Nayak6-Sep-04 0:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.