| Author |
Topic Search Topic Options
|
theSCIENTIST
Senior Member
Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
|
Post Options
Thanks(0)
Quote Reply
Topic: XML issues Posted: 08 April 2005 at 2:53pm |
|
Hi guys,
I'm having some issues using XML to store data in my application, I'm using ASP and XML to store user input such as comments and things like that.
Here are the questions to which I couldn't find the answers
1. What is the limit of the data I can store per node? ( <node>data</node> )
2. What about the limit of attributes in nodes? ( <node attr="data"></node> )
3. What would make more sence or be quicker to process using n.1 or n.2 above to store data?
4. When I create my elements in the XML file, they get all in the same line ( <node1><node2>data</node2></node1> ) for readability in dubugging mainly I would like it like:
<node1>
<node2>data</node2>
</node1>
How to do this? In VB.NET they are created the proper way but not in ASP.
5. Paging, how to with XML?
6. Is XML viable to store large ammounts of information?
Thanks guys.
|
|
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
Posted: 08 April 2005 at 3:53pm |
|
I'm not sure about all of those questions but I'll answer some
3) doesn't make a difference, but something like
<add key="x" value="y"/>
is more maintainable than
<add>
<key>x</key>
<value>y</value>
</add>
IMHO
5) What language? ASP or ASP.NET?
9) Not really, everytime you parse the xml document it is loaded into
the servers memory and then unloaded (like an access db) that has
performance disadvantages if the file is large
|
 |
theSCIENTIST
Senior Member
Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
|
Post Options
Thanks(0)
Quote Reply
Posted: 08 April 2005 at 4:57pm |
|
Thanks Mart.
3. I will now try to use attributes on one node only per post to store it's data, I also figured that by using attributes you save a great deal in file size, but I don't know how much data I can store, I haven't found anything on this.
5. Do paging with XML data in ASP.
6. Yes, I know the file is loaded in memory, but I will use one file per days worth of input, so the files will be named like (posts_08-apr-2005.xml) to get small files, thanks for reminding me of this issue.
-----------------------------------------------------
Anyone to help with points 1, 2, 4, and 5 above?
Thanks.
|
|
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
Posted: 08 April 2005 at 5:14pm |
|
1. I don't think there is any limit of data stored per node in the
spec. (from what I can see) but parsers may limit it (I bet it will be
a high limit if there is one). I think the only limit is because of
NTFS which limits files to 16 terabytes.
2. Can't see anything in the spec either
5. Haven't used ASP in years, don't know how sorry
|
 |
theSCIENTIST
Senior Member
Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
|
Post Options
Thanks(0)
Quote Reply
Posted: 08 April 2005 at 8:03pm |
|
Thanks,
Questions from old bunch:
4. Does anyone knows how to break lines in XML files creating from ASP pages? All my elements going sideways one next to the other, I would rather have them going down.
5. How do do paging from XML data with ASP?
New question: How to do sorting, search, edit, update, delete, I can do inserts :) but the other operations are proving tricky, anyway has experience in this? I can't use SQL to query it can I? I heard of a COM for it, but I rather use native methods, anyone?
Almost there, but not quite :|
|
|
|
 |
Phat
Senior Member
Joined: 23 February 2003
Status: Offline
Points: 386
|
Post Options
Thanks(0)
Quote Reply
Posted: 09 April 2005 at 2:15am |
|
4. from memory Use vbCrlf or Chr(10) or Char(10) & Chr(9)
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
Posted: 09 April 2005 at 5:37am |
You can't use SQL to select data but you can use XPath
theSCIENTIST wrote:
Thanks,
Questions from old bunch:
4. Does anyone knows how to break lines in XML files creating from
ASP pages? All my elements going sideways one next to the other, I
would rather have them going down.
5. How do do paging from XML data with ASP?
New question: How to do sorting, search, edit, update, delete, I
can do inserts :) but the other operations are proving tricky, anyway
has experience in this? I can't use SQL to query it can I? I heard of a
COM for it, but I rather use native methods, anyone?
Almost there, but not quite :| |
|
 |
theSCIENTIST
Senior Member
Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
|
Post Options
Thanks(0)
Quote Reply
Posted: 09 April 2005 at 1:27pm |
Phat wrote:
4. from memory Use vbCrlf or Chr(10) or Char(10) & Chr(9) |
Sorry, tried all that before, don't work, I'm beginning to wonder whether there is a method to do this, or is just simply a XMLDOM design feature. [How to create XML elements that will auto indent and the nodes are put one on top of the other as opposed to next of each other?] (ASP and XMLDOM) Anyone for the taking?
Mart wrote:
You can't use SQL to select data but you can use XPath |
Yep, I'm already researching XPath, was able to delete a node based on it's ID attribute :) I assume at this stage that the edit op will also be easy, not so sure for the sorting, paging and searching :Z
|
|
|
 |