473,499 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

serializing big static XML peaces

Hi all,

I need to build XML files. Some XML files are almost entirely static
containing some dynamic content. An example is a file I need to build
that contains about 100 line that are static. Somewhere in the middle
I need to inject some dynamic XML lines.

Someone has an idea on how to best solve this? With a template engine?

Greets,
Stijn
Oct 29 '08 #1
1 1100
"Tarscher" <ta******@gmail.comwrote in message
news:ef**********************************@y79g2000 hsa.googlegroups.com...
Hi all,

I need to build XML files. Some XML files are almost entirely static
containing some dynamic content. An example is a file I need to build
that contains about 100 line that are static. Somewhere in the middle
I need to inject some dynamic XML lines.

Someone has an idea on how to best solve this? With a template engine?
* Save the static part in an xml-file on disk
* Open and parse this file with an XML DOM parser
* Use XPath/LINQ on the DOM tree to grab the parent-node
of where you want to add your dunamic content
* Create new nodes with the DOM object, containing your
dynamic content.
* Add them to the selected parent node.
* Save, or use the resulting XML-DOM tree.

--
Dag.
Oct 29 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
353
by: Angelos Karantzalis | last post by:
Hi guys. I've come across a problem when I tried to serialize a class into xml, only to discover that the parent class's XML Serialization properties weren't included in the output xml. ...
2
2120
by: Werner B. Strydom | last post by:
Hi I wrote a class, Document, which has an Array of ITask objects. In order to serialize the tasks contained within the tasks array, I marked each task class with an attribute , and added an...
0
2802
by: Tom Kent | last post by:
I have an array list of objects that I want to serialize into an XML file. I have tried this using the following code, but it gives me an error message An unhandled exception of type...
4
5387
by: John Vottero | last post by:
When a class contains a TimeSpan property, XmlSerializer doesn't work. A TimeSpan property is serialized like: <MySpan /> I've read a number of posts that talk about why this happens and how...
3
3143
by: Don McNamara | last post by:
Hi, I've hit quite a strange problem with XmlSerializer on my W2K3 server. When I serialize/deserialize using an exe on my local computer (XP), everything works fine. When I put the code out on...
0
1386
by: Kenneth Baltrinic | last post by:
Is the following code correct for serializing a quasi-single class, that is a class that has a descreet (though more than one, so not a true singleton) number of static instances and no dynamically...
0
1027
by: JackRazz | last post by:
Is it possible to serialize a static class containing shared variables like I can serialize an instance of a normal class (obj)? I had a static class, but I gave up and converted it into a normal...
1
831
by: Peter Nofelt | last post by:
Hey All, I am having issue with serializing a class and its base class using ..net 2.0. I am using IXmlSerializable I've provided code displaying my at the bottom of this post. Thanks ahead...
4
1633
by: Mantorok | last post by:
Hi all Is there a way to serialize the current form's layout to a string or file? I'll re-phrase - is there an EASY way to do it ;-) Thanks Kev
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.