#136411 - 2005-03-28 08:07 PM
Re: RFC: XML UDF's
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Jim,
I'm still working muchly with the "raw" XML functions. Lessons learned so far:
1) Reading Attributes of a node is much, much faster than reading child-elements (of the node) containing the same information... for example reading this:
Code:
<node1> <data1>1</data1> <data2>2</data2> </node1>
is much slower then reading this:
Code:
<node1 data1="1" data2="2"> </node1>
Probably this has more to do with how one would "design" their schema, versus the UDF's themselves - just an observation.
-Shawn
|
Top
|
|
|
|
#136414 - 2005-03-28 08:57 PM
Re: RFC: XML UDF's
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Having a "messy" XML file isn't necessarily a "bad thing", if one has a half-decent XML editor/viewer to edit/view with ;0)
Lesson learned number #3 - messy XML aint the end of the world ... here's a sample of my GRID (spread-sheet) like schema so far...
<Grid RowCount="11" ColumnCount="3" AllowSorting="-1" AlternatingBackColor="-1" BackColor="16777215" ColumnHeaderStyle="2" CurrentColumnIndex="0" CurrentRowIndex="0" FontName="Verdana" FontSize="8" ForeColor="0" FullRowSelect="0" GridColor="8421504" GridLines="3" MultiSelect="0" ReadOnly="0" SingleClickEdit="0"> - <Columns> <Column.0 Index="0" Alignment="-1" AllowSorting="-1" BackColor="-1" CellType="-1" ForeColor="-1" Format="" HeaderText="CategoryID" ImageIndex="-1" MinimumWidth="15" Name="CategoryID" ReadOnly="0" Resizable="-1" Width="100" ValueType="5" /> <Column.1 Index="1" Alignment="-1" AllowSorting="-1" BackColor="-1" CellType="-1" ForeColor="-1" Format="" HeaderText="CategoryName" ImageIndex="-1" MinimumWidth="15" Name="CategoryName" ReadOnly="0" Resizable="-1" Width="100" ValueType="8" /> <Column.2 Index="2" Alignment="-1" AllowSorting="-1" BackColor="-1" CellType="-1" ForeColor="-1" Format="" HeaderText="Description" ImageIndex="-1" MinimumWidth="15" Name="Description" ReadOnly="0" Resizable="-1" Width="100" ValueType="8" /> </Columns> - <Cells> <Cell.0.0 Value="1" RowIndex="0" ColumnIndex="0" /> <Cell.0.1 Value="Beverages" RowIndex="0" ColumnIndex="1" /> <Cell.0.2 Value="Soft drinks, coffees, teas, beers, and ales" RowIndex="0" ColumnIndex="2" /> <Cell.1.0 Value="2" RowIndex="1" ColumnIndex="0" /> <Cell.1.1 Value="Condiments" RowIndex="1" ColumnIndex="1" /> <Cell.1.2 Value="Sweet and savory sauces, relishes, spreads, and seasonings" RowIndex="1" ColumnIndex="2" /> <Cell.2.0 Value="3" RowIndex="2" ColumnIndex="0" /> <Cell.2.1 Value="Confections" RowIndex="2" ColumnIndex="1" /> <Cell.2.2 Value="Desserts, candies, and sweet breads" RowIndex="2" ColumnIndex="2" /> <Cell.3.0 Value="4" RowIndex="3" ColumnIndex="0" /> <Cell.3.1 Value="Dairy Products" RowIndex="3" ColumnIndex="1" /> <Cell.3.2 Value="Cheeses" RowIndex="3" ColumnIndex="2" /> <Cell.4.0 Value="5" RowIndex="4" ColumnIndex="0" /> <Cell.4.1 Value="Grains/Cereals" RowIndex="4" ColumnIndex="1" /> <Cell.4.2 Value="Breads, crackers, pasta, and cereal" RowIndex="4" ColumnIndex="2" /> <Cell.5.0 Value="6" RowIndex="5" ColumnIndex="0" /> <Cell.5.1 Value="Meat/Poultry" RowIndex="5" ColumnIndex="1" /> <Cell.5.2 Value="Prepared meats" RowIndex="5" ColumnIndex="2" /> <Cell.6.0 Value="7" RowIndex="6" ColumnIndex="0" /> <Cell.6.1 Value="Produce" RowIndex="6" ColumnIndex="1" /> <Cell.6.2 Value="Dried fruit and bean curd" RowIndex="6" ColumnIndex="2" /> <Cell.7.0 Value="8" RowIndex="7" ColumnIndex="0" /> <Cell.7.1 Value="Seafood" RowIndex="7" ColumnIndex="1" /> <Cell.7.2 Value="Seaweed and fish" RowIndex="7" ColumnIndex="2" /> <Cell.8.0 Value="13" RowIndex="8" ColumnIndex="0" /> <Cell.8.1 Value="ssss" RowIndex="8" ColumnIndex="1" /> <Cell.9.0 Value="14" RowIndex="9" ColumnIndex="0" /> <Cell.9.1 Value="xxxx" RowIndex="9" ColumnIndex="1" /> <Cell.10.0 Value="9" RowIndex="10" ColumnIndex="0" /> <Cell.10.1 Value="Shawn" RowIndex="10" ColumnIndex="1" /> </Cells> </Grid>
|
Top
|
|
|
|
#136418 - 2005-04-26 02:16 AM
Re: RFC: XML UDF's
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Jose/Jim.
I have been playing much with the XMLDOM object model and wrote a little script that helped me "explore" the model. Its actually quite instructive to poke around XMLDOM and see (visually) just how "strange" it is.
If you want to check it out (the work-in-progress), I posted it here:
XML Workshop
You need the latest kixforms dev build to run this, here:
Kixforms Development Build
Would love to get your feedback/observations on this.
-Shawn
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 369 anonymous users online.
|
|
|