ASP Nuke
>
Member Login
Username
Password

Don't have an account yet, register now it's free!
I forgot my password


Article Search

Message Forums
ASP Nuke  (221/420)
ASP Development  (12/22)
SQL Server Development  (5/12)

Suggestion Box

Have a suggestion on how we can improve this application?

Please send us your suggestions, we would love to hear what you have to say!


Help ASP Nuke

Help support "ASP Nuke" and free software by donating now


Task List

ASP Nuke Tasks:


Simple XML Parsing Library for ASP Nuke
by Kenneth Richards - Friday, January 28, 2005
from the Themes dept.

In preparation for adding theme support to ASP Nuke, I put together an ASP class that will parse an XML document and put it in a neatly organized class hierarchy. You can then query the document for a specific node or nodes and iterate over the results. This will be used to manage the configuration files for each ASP Nuke theme. The contents of which will be parsed and placed in the database for easy browsing.

The parser will handle multiple elements each with their own attributes. It can handle regular and self-closing elements and has no problems handling multiple elements with the same name. By using Microsoft's regular expression parser I was able to make the entire process very efficient. The XML configuration files are not very big so it wasn't too critical to make it efficient.

One thing I haven't solved yet is what to do with content between an open and closing element which is embedded with sub-elements. My parser will parse the sub-elements just fine, but I haven't worked out any way to handle content that is intermixed around the child elements. Maybe I will just wait until I absolutely need this functionality before I solve the problem.

Of course, I could have used Microsoft's SAX XMLReader object to do the parsing. But I am always trying to keep the requirements for my Nuke software to a minimum so it is easy-to-install as possible.

FAQ

Web Links
Download
Sponsors

Poll

What's Your Favorite Browser?

Mozilla Firefox
Internet Explorer
Netscape
Safari
Opera
Other

View Results . Archive


Other Languages

Join the language translation project  to translate ASP Nuke into other languages


Hit Counter
Total page views since
Sept 19, 2003

696411

Valid CSS!
Valid HTML 4.01!

   Watching football is like watching pornography. There's plenty of action, and I can't take my eyes off it, but when it's over, I wonder why the hell I spent an afternoon doing it. -- Luke Salisbury   
© 2002 Orvado Technologies, All Rights Reserved - Site Map - CSS - HTML - 31.2500 msec