XmlTextWriter and knowing wich element is opened at run time

Is there a way when yoy write xml with XmlTextWriter to know at run time 
wich xml element are opened ?

Sam 
0
nospam7515 (2084)
9/17/2007 8:42:22 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
497 Views

Similar Articles

[PageSpeed] 54

sam wrote:
> Is there a way when yoy write xml with XmlTextWriter to know at run time 
> wich xml element are opened ?

Xml(Text)Writer does not expose properties or methods to give you 
information which elements are currently open respectively for which 
elements the start tag has already been written but not the end tag.

What exactly are you trying to achieve? Maybe we can provide an 
alternative approach.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
9/18/2007 12:22:00 PM
"Martin Honnen" <mahotrash@yahoo.de> wrote:
> What exactly are you trying to achieve? Maybe we can provide an 
> alternative approach.

I use XmlText Writer and create a hierarchical xml. So Today I use 
intensivly boolean variables to get the state of which xml element is opened 
are closed.
I am looking for a way that limit the use of boolean variable.

Sam

0
nospam7515 (2084)
9/19/2007 6:08:37 AM
Reply:

Similar Artilces:

Time Sheet Function to Calculate
I am having some trouble trying to establish a formula that will give me the number of hours worked during the day given the start time say 8.30am with an end time of 5.30pm and say 30 minutes for lunch. For this scenario, total working hours would be eight and a half hours but I need Excel to display this result as 8.30 hours (0.30 being the minutes in the half hour) and not 8.50. Can someone suggest what to do? Typically the layout would be Column A - Start Time say 8.30am Column B - Time in minutes spent at lunch say 30 minutes Column C - End Time say 5.30pm. Column D - the calculati...

Default: Open to Calendar
Can I set Outlook 2003 to open to the Calendar as my default page/window? Yes. See Tools > Options > Other tab > Advanced Options button. The setting you area after is right at the top of the dialog. "Bryan" <bryan.459@pac.bell.net> wrote in message news:C_hyf.1012$Jd.431@newssvr25.news.prodigy.net... > Can I set Outlook 2003 to open to the Calendar as my default page/window? > "neo [mvp outlook]" <neo@online.mvps.org> wrote in message news:ul52teYGGHA.3976@TK2MSFTNGP11.phx.gbl... > Yes. See Tools > Options > Other tab >...

Opening a file
When I open a file in excel, it automatically opens a blank(new) file along with the file I was intending to open. Is there a setting to defeat it from doing this? Thank you. Try this first. Close Excel first and On the Windows Taskbar 1) Start>Run "excel.exe /unregserver"(no quotes)>OK. 2) Start>Run "excel.exe /regserver"(no quotes)>OK. See the space between exe and /regserver You might have to designate a full path to excel.exe. In that case Start>Run "C:\yourpath\excel.exe" /regserver(quotes required)>OK If no...

Prevent Access To already open file
Hi, I am new to excell and this forum. Is there a way of preventing someone else opening an excel spreadsheet whilst it is being edited by someonelse even read only. Regards Dave:confused: -- ashtod1 ------------------------------------------------------------------------ ashtod1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30168 View this thread: http://www.excelforum.com/showthread.php?threadid=498523 ...

Opening Publisher Files #4
I received an email with a Publisher 2003 Flyer attached. I have Pblisher 2000 and are not able to open the file. Is it possible? If so, how? Thanks!!! While waiting for decisions from his 6 university choices, Ed sees a message from Winnie <Winnie@discussions.microsoft.com>. On it is written: > I received an email with a Publisher 2003 Flyer attached. I have > Pblisher 2000 and are not able to open the file. Is it possible? Try asking the person who sent you the file to do a File > Save As... > Publisher 2000. -- Ed Bennett - MVP Microsoft Publisher http://ww...

esc key wont close open email
This is slowly driving me insane......at home and at my previous job when i hit the escape key the email that I have open closes, but at my current job it doesn't and it is quite annoying. does anyone know why?? -- melmason Check if you have any special addons that might utilize the "cancel" button (non standard buttons on your mail form?the message loosing focus while reading?) "melmason" <melmason.5aeae71@outlookbanter.com> wrote in message news:melmason.5aeae71@outlookbanter.com... > > This is slowly driving me insane......a...

SMTP Log Times
I have my Exchange 2003 server save SMTP logs every hour. In Windows Explorer there is a file for each hour but when I open the file it gives a 24 time that does not correspond to the time the file was saved. Example: A file saved at 1 pm today has a time field from 17:00:31 to 17:59.08. The system clock on the server gives the correct time. Does exchange have a different place to set time? gbs I'm pretty sure it will only use GMT. Monthly: Log files are created monthly, starting with the first entry that occurs after midnight of the last day of the month. NOTE: "Midnight&qu...

Anyone know what diff 'languages' of resources makes?
I am using VC++ 5 (Visual Studio 97). I notice that if you look at the Properties for any resource they all have a Language setting. As things have evolved, I use 'English (U.K.)' for all resources (icons, dialogs, menus, etc) except String Tables, all of which are 'English (U.S.)'. I notice that you can set a Language in the Resources tab of the Project Settings dialog. I always use 'Engish (United Kingdom)' for this. I used to think that the language of a resource was just a resource compiler directive thing (do they get compiled in or not) and some of the ...

How to change restriction to open internet links on outlook email?
HI, I tried to open a link in an email sent to me but a message popped up saying this, "This operation has been cancelled due to restrictions in effect on this computer. Please contact your administrator." I am the administrator. What do I do? Thank you for any help. It is an error with Internet Explorer see the following for the fix http://www.slipstick.com/problems/link_restrict.htm -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. "Hello" <Hello@discussions....

Not enough memory error
I have an Excel 2000 file in which I created a very long macro that basically copies indiviudal cells from one worksheet into another changing structure of the data basically. It worked fine when I ran it against 3 files I needed to copy the data from. When I tried to do a 4th file of the exact same format I got the not enough memory error. I shut down excel and the computer but I still get the error and can't open the macro file . Am I screwed? Or is there a way for me to retrieve - get my macro back so I can try modifying it or my process so I don't have this problem again. ...

How do I open old excel files in 2003?
i need assistance in opening older excel files in excel 2003. errot indicates my antivirus is the problem. In that I can not open "any" previous excel files I believe it is a office 2003 upgrade problem. Now what? Hi never heard of that. Normally you should have no problems with older Excel files. Does turning your Antivirus software help? -- Regards Frank Kabel Frankfurt, Germany DG wrote: > i need assistance in opening older excel files in excel 2003. errot > indicates my antivirus is the problem. In that I can not open "any" > previous excel files I ...

XmlTextWriter and whitespace
Hi, I've a routine that exports a DB query to Excel by building an XmlDocument and saving to a XmlTextWriter. The function works but new lines don't show up, i.e. significant whitespace is cut. I've tried adding WriteAttributeString("xml", "space", null, "preserve") to the XmlTextWriter just prior to save, but that results in the error: "Index was outside the bounds of the array." Can anyone assist? Many thanks, Simon Lane Have you tried playing with the PreserveWhitespace property of XmlDocument? <st@jpa.co.jp> wrote in message...

Why must a sheet be open to change options for ALL sheets?
I have never for the life of me understood why Excel's Tools / Options is completely disabled if no sheet is open. To my mind, Microsoft has never implemented a distinction between options applying to the current sheet, versus those applying to all sheets. Example: It makes no sense whatever to require a sheet to be displayed merely for you to set the macro security level--an option which determines what action will occur when a sheet opens to BEGIN with. And on and on. Better yet, why aren't there TWO SEPARATE sets of options? One for the current sheet, and one for all sheets? **...

HOW TO SET AUTOMATIC OPENING
How do you get pictures (attachments)to open automatically in the preview pane in Outlook? I use Irfanview and it works perfectly for everything else and opens automatically in all except Outlook. Outlook doesn't have this feature.... Renee wrote: > How do you get pictures (attachments)to open > automatically in the preview pane in Outlook? I use > Irfanview and it works perfectly for everything else and > opens automatically in all except Outlook. Any idea what the PS is on the icons? >-----Original Message----- >Outlook doesn't have this feature.... > &...

Start Time and End time it maybe for 1 day or it maybe for 2 days
Here is my sheet. I go out Jan 1 @21:00 and get back Jan 2 @09:00 then the next day out @09:00 and back in @21:00. Is there a way to write a formula that will do nothing if C2 is empty then go to the next Day ( C3 ) and count the hours for D3? at the same time if i was to go out and back in like cell B4 on the same day. So i need to have a formula to work for both in one cell and have it choose which one to use. Not sure how i would put it. Should i use IF, OR, AND. this one has me thinking. Who knows it just might be simple. Any ideas???? A B C ...

how do I import a XMLTextWriter into an XMLDOCUMENT?
Hi: I want to append a new transaction to a transaction log. The transaction log is trans.xml <transactions> <transaction> <id>12</id> <stamp>1/1/1900 12:02</stamp> </transaction> </transactions> Basically I have been able to make the new TRANSACTION fragments using an XMLTextWriter. My XMLDocument loads the xml file from disk. How do I 'import' or 'insert' the contents of the XMLTextWriter into my XMLDocument. All of the examples I have seen write straight to the file, but replace whatever was al...

How to keep a new window from opening each time I open a new docum
I use Word 2003 w/Windows Vista. I don't want to have each new word document that I open, open in a new window. I liked it the old way. How can I change this so that they are all open in the same window? -- Creations by Janice www.CreationsbyJanice.com Check tools > Options > View > Windows in Taskbar. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> >...

Don't know how to describe it
I was working on a brochure from the publications option of Publisher and somehow I enlarged the drop down menu for the office clipboard and now I can't get it to fit on the screen. It is almost as if it runs on off the bottom of the screen. Can anyone help I cannot interpret what you mean either. I am perplexed. Can you please describe your issue better. What version of PUBLISHER are you using. -- "Never give your mind or heart away" Edit, Office Clipboard, when the taskpane opens, click Options on the bottom of the taskpane, clear the appropriate boxes. -- Mary...

Report opens in wrong view from switchboard
Access 2007 does this weird thing where my reports are opening in a different view than I've selected as the default view from my switchboard menu. If i select and run the report from the navigation pane, the report opens in the default view as specified in properties. However, if a button is clicked on the switchboard it will open the report seemingly according to its own set of rules which seem to have nothing to do with the default view specified. post the code that opens the report from the switchboard. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia &...

why do 5 workbooks open when I double click one
I double click on an Excel file and 4 or 5 files open simultaneously. you have workbooks stored in your XLStart folder, a hidden folder that you could put workbooks in it in order to open workbooks automatically once you open excel. to get rid of this problem, you have to turn on "show hidden fikes" in windows. to do this, double click on my documents --> go to tools,folder options, underf iles and folders, check "show hidden files and folders" radio button then click ok. go tothe path below, assuming C is the letter for your hard drive, and ofcourse User is your...

Time out in fast updation of sql server database
Hi all, Myself using Sql server through mfc odbc , CDatabase class and a class derived from Crecordset class .. I use RFX_Text of CMyRecordset::DoFieldExchange . Now i have to update a particular field some 4000 times per min. I did something like that . CDatabase objdatabase; objdatabase.openex(connection strign);//opens successfully MyRecordSet objMyrecordset(&objDatabase) ;//object of a class derived from CRecordset In a function ..(which get called some 4000 time per minute) { objMyrecordset.Open(CRecordset::dynaset ,strOpenRecordSet);//seleting one record at one time ...

Pasting into html input element in Outlook 2000 & up
When I open an html email that contains a form in Outlook 2000, it is not possible to paste copied text into html text input elements. Anyone who know how to resolve this please help. Thanks, Marcel ...

XmlTextWriter
I am using the XmlTextWriter class to generate some XML however if I try to do something like string str = "cost �500"; xtw.WriteElementString("symbol", str); The � does not get encoded to &#163; like it should. I have tried changing the encoding of it but none of the options (Unicode, UTF8 etc.) perform the encoding correctly. At the moment I have just replaced the above with xtw.WriteStartElement("string"); str = "cost �500"; str = str.Replace("�", "&#163;"); xtw.WriteRaw(str); xtw.WriteEndElement(); Which does the tri...

Microsoft Office Software Update 11.3.5 causes apps not to open
Hello, Anyone else had this problem? Microsoft apps do not open: error message says Microsoft [office app] cannot load the Microsoft Office shared libraries It then sugests place app back in Office folder (it never left!) or Reinstall On 5/28/07 8:31 AM, in article 1180366298.551059.9630@q75g2000hsh.googlegroups.com, "nick.normanbutler@gmail.com" <nick.normanbutler@gmail.com> wrote: > Anyone else had this problem? > Microsoft apps do not open: error message says Microsoft [office app] > cannot load the Microsoft Office shared libraries When you try to start a M...

ID no: c1030af0 (Exchange System Manager), opening Public Folders
Hi all, when i'm trying to open Folders -> Public Folders in Exchange System Manager, i'm getting this error: ----- The operation failed due to an invalid format in the HTTP request. Verify that the host header is correct for the virtual server. ID no: c1030af0 Exchange System Manager ----- Windows Server 2003 (latest hotfixes, but no SP1), Exchange 2003 SP1 Thankx in advance! ...