p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
I forgot my password
Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other programmers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 26th, 2009, 09:44 PM
Authorized User
Points: 211, Level: 4
Points: 211, Level: 4 Points: 211, Level: 4 Points: 211, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parse and Format XML

I am able to read in the following xml document into my website with the following code:

Code:
<?xml version="1.0" encoding="utf-8" ?>
<content>
  <paragraph1>
    This is the content for paragraph one.
 <li>List Item 1</li>
 <li>List Item 2</li>
 <li>List Item 3</li>
  </paragraph1>
  <paragraph2>
    This is the content for paragraph 2.
  </paragraph2>
</content>
Code:
        
        Dim doc As New System.Xml.XmlDocument()
        doc.Load(Server.MapPath("App_Data/content.xml"))
        p1.InnerText = doc.InnerText

But it reads it in as one paragraph. How can I read the xml file in and format it based on its nodes? Everything that I have tried throws an object undeclared error.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 4th, 2009, 05:55 AM
Banned
 
Join Date: Apr 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
The parse-xmlgeneric function processes XML input, returning a list of XML tags, attributes, and text. The :pxml module is loaded with the form (require :pxml). Symbols naming functionality in the module are in the net.xml.parser package. Examples in this document assume (use-package :net.xml.parser) has been evaluated.
Here is a simple example:

(parse-xml "<item1><item2 att1='one'/>this is some text</item1>")

-->((item1 ((item2 att1 "one")) "this is some text")) The output format is known as LXML (Lisp XML) format.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old May 4th, 2009, 05:57 AM
Banned
 
Join Date: Apr 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
The parse-xmlgeneric function processes XML input, returning a list of XML tags, attributes, and text. The :pxml module is loaded with the form (require :pxml). Symbols naming functionality in the module are in the net.xml.parser package. Examples in this document assume (use-package :net.xml.parser) has been evaluated.
Here is a simple example:

(parse-xml "<item1><item2 att1='one'/>this is some text</item1>")

-->((item1 ((item2 att1 "one")) "this is some text")) The output format is known as LXML (Lisp XML) format.

web developers atlanta
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
parse xml data everest SQL Server 2005 0 March 6th, 2008 01:40 AM
Parse XML in ASP delaneyp Classic ASP XML 1 February 6th, 2006 07:42 AM
Parse XML response atulb XML 1 October 30th, 2005 06:05 AM
about XML receive by tomcatand XML parse by java taianmhzy Servlets 0 May 20th, 2004 01:59 AM
about XML receive ang XML parse by tomcat taianmhzy Apache Tomcat 0 May 20th, 2004 01:56 AM



All times are GMT -4. The time now is 03:40 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 2010 Wiley Publishing, Inc