472,971 Members | 2,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,971 software developers and data experts.

XmlTextReader ReadChars can enter an infinate loop when reading st

The following code will enter an infinate loop when in ReadChars. I can only
make it happen when reading a Stream and with this particular XML. If I use
the ReadInnerXml call rather than my own ReadElementBodyAsXml the code works,
but is less efficent. ReadElementBodyAsXml is required by my application
with .Net Framework 1.1.

The code breaks on the second call to ReadElementBodyAsXml with the inner xml:
</EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterHmiResources"><HmiResources>
<HmiResource Name="hgyugyg" />
</HmiResources></EGDConfigExtension>
This is bad behavior, so I felt it should be posted. Maybe it is already
know to be fixed in SP1 (hopefully forthcoming).

Regards,
Rick

--- code that breaks ---
private void ReadXml()
{
FileStream fs = File.OpenRead(@"MasterSymbolTable.xml");
XmlTextReader reader = new XmlTextReader(fs, XmlNodeType.Element, null);
reader.MoveToContent();
reader.ReadToDescendant("EGDConfigExtension");
string xml = ReadElementBodyAsXml(reader);
reader.Read();
xml = ReadElementBodyAsXml(reader);
}

private string ReadElementBodyAsXml(XmlTextReader reader)
{
int startingLineNumber = reader.LineNumber;
int startingLinePosition = reader.LinePosition;
int startingDepth = reader.Depth;
bool startingElementIsEmpty = reader.IsEmptyElement;
string startingName = reader.Name;

System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element,
"Node type must be Element.",
"ReadElementBodyAsXml should be called when the reader is positioned on
an element. It will simply return null if it is not, but the intention is
for it to be used to read element content.");

char[] buffer = new char[512];
int totalRead = 0;
int i;
while ((i = reader.ReadChars(buffer, totalRead, buffer.Length -
totalRead)) 0)
{
totalRead += i;
if (reader.Depth <= startingDepth)
{
// Even though we read chars, the LineNumber and LinePosition do not
change
// unless we read a node. We don't want to read any more unless we are
// on a child node. But we also need to make sure that we are not still
// on the same node that we started with, since we could have some very
// big nodes. It is hard to tell if ReadChars returned because it did
// not have any more content buffered or if it got to the end of a node.
// If at the end of a node, which node?
// This code fixes SCR 2923.
if (reader.NodeType != XmlNodeType.Element)
break; // We must not be on the node we started on.
}
if (reader.NodeType == XmlNodeType.EndElement && reader.Depth ==
startingDepth)
break;
if (totalRead == buffer.Length)
{
char[] newBuf = new char[buffer.Length + 512];
Buffer.BlockCopy(buffer, 0, newBuf, 0, totalRead * 2); // Each char is
2 bytes.
buffer = newBuf;
}
}

string innerXml = null;
if (totalRead 0)
innerXml = new string(buffer, 0, totalRead);
else
innerXml = null;

return innerXml;
}

----- XML file MasterSymbolTable.Xml ---
<?xml version="1.0" encoding="utf-8"?>
<?GeCssClass type="GeIndsysNetworkCoe.EgdConfig.EgdMasterSymbol Table,
EgdCoeConfig"?>
<MasterEgdSymbolTable EGDSpecVersion="3.04" ConfigTimeSecs="1160762827"
ConfigTimeNSecs="704238500" xmlns="http://geindustrial.com/EGD" Name="Demo">
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterAlarms"><AlarmClasses>
<AlarmClass Name="Alarm" Description="Default Class for Process Alarms"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Red" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Red" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Trip" Description="Default Class for Convertor Trips"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Maroon" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Maroon" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="System" Description="Default Class for WorkstationST
System alarms" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Teal"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Teal" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="Diagnostic" Description="Default Class for Process
Diagnostics" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Red"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Red" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="Hold" Description="Default Class for Holds" DescAlt=""
NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Diag" Description="Default Class for Process Diagnostics"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Red" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Red" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Sys" Description="Default Class for WorkstationST System
alarms" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Teal"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Teal" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="TEST" Description="Test Alarm Class" DescAlt=""
NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Maroon" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Maroon" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="OpSet" Description="Alarm Class for Operator Setpoint
Events" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Yellow"
AlarmForegroundColor="Black" AckBackgroundColor="Black"
AckForegroundColor="Yellow" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="SOE" Description="Default Class for Sequence of event"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Event" Description="Default Class for Process Events"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
</AlarmClasses></EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterHmiResources"><HmiResources>
<HmiResource Name="hgyugyg" />
</HmiResources></EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterPlantAreas"><PlantAreas>
<PlantAreaPath Path="Plant" />
<PlantAreaPath Path="Plant.PlantArea01" />
<PlantAreaPath Path="Plant.PlantArea01.PlantArea21" />
<PlantAreaPath Path="Plant.PlantArea02" />
<PlantAreaPath Path="Plant.PlantArea04" />
<PlantAreaPath Path="Plant.PlantArea14" />
<PlantAreaPath Path="Plant.PlantArea15" />
</PlantAreas></EGDConfigExtension>
</MasterEgdSymbolTable>

Oct 26 '06 #1
13 3179
I forgot to mention, the infinate loop is in .Net Framework 2.0. I have the
hotfixes (KB924895 and KB922271) (as well as 2 security updates) installed.
--
Rick
"Rick" wrote:
The following code will enter an infinate loop when in ReadChars. I can only
make it happen when reading a Stream and with this particular XML. If I use
the ReadInnerXml call rather than my own ReadElementBodyAsXml the code works,
but is less efficent. ReadElementBodyAsXml is required by my application
with .Net Framework 1.1.

The code breaks on the second call to ReadElementBodyAsXml with the inner xml:
</EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterHmiResources"><HmiResources>
<HmiResource Name="hgyugyg" />
</HmiResources></EGDConfigExtension>
This is bad behavior, so I felt it should be posted. Maybe it is already
know to be fixed in SP1 (hopefully forthcoming).

Regards,
Rick

--- code that breaks ---
private void ReadXml()
{
FileStream fs = File.OpenRead(@"MasterSymbolTable.xml");
XmlTextReader reader = new XmlTextReader(fs, XmlNodeType.Element, null);
reader.MoveToContent();
reader.ReadToDescendant("EGDConfigExtension");
string xml = ReadElementBodyAsXml(reader);
reader.Read();
xml = ReadElementBodyAsXml(reader);
}

private string ReadElementBodyAsXml(XmlTextReader reader)
{
int startingLineNumber = reader.LineNumber;
int startingLinePosition = reader.LinePosition;
int startingDepth = reader.Depth;
bool startingElementIsEmpty = reader.IsEmptyElement;
string startingName = reader.Name;

System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element,
"Node type must be Element.",
"ReadElementBodyAsXml should be called when the reader is positioned on
an element. It will simply return null if it is not, but the intention is
for it to be used to read element content.");

char[] buffer = new char[512];
int totalRead = 0;
int i;
while ((i = reader.ReadChars(buffer, totalRead, buffer.Length -
totalRead)) 0)
{
totalRead += i;
if (reader.Depth <= startingDepth)
{
// Even though we read chars, the LineNumber and LinePosition do not
change
// unless we read a node. We don't want to read any more unless we are
// on a child node. But we also need to make sure that we are not still
// on the same node that we started with, since we could have some very
// big nodes. It is hard to tell if ReadChars returned because it did
// not have any more content buffered or if it got to the end of a node.
// If at the end of a node, which node?
// This code fixes SCR 2923.
if (reader.NodeType != XmlNodeType.Element)
break; // We must not be on the node we started on.
}
if (reader.NodeType == XmlNodeType.EndElement && reader.Depth ==
startingDepth)
break;
if (totalRead == buffer.Length)
{
char[] newBuf = new char[buffer.Length + 512];
Buffer.BlockCopy(buffer, 0, newBuf, 0, totalRead * 2); // Each char is
2 bytes.
buffer = newBuf;
}
}

string innerXml = null;
if (totalRead 0)
innerXml = new string(buffer, 0, totalRead);
else
innerXml = null;

return innerXml;
}

----- XML file MasterSymbolTable.Xml ---
<?xml version="1.0" encoding="utf-8"?>
<?GeCssClass type="GeIndsysNetworkCoe.EgdConfig.EgdMasterSymbol Table,
EgdCoeConfig"?>
<MasterEgdSymbolTable EGDSpecVersion="3.04" ConfigTimeSecs="1160762827"
ConfigTimeNSecs="704238500" xmlns="http://geindustrial.com/EGD" Name="Demo">
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterAlarms"><AlarmClasses>
<AlarmClass Name="Alarm" Description="Default Class for Process Alarms"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Red" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Red" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Trip" Description="Default Class for Convertor Trips"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Maroon" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Maroon" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="System" Description="Default Class for WorkstationST
System alarms" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Teal"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Teal" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="Diagnostic" Description="Default Class for Process
Diagnostics" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Red"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Red" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="Hold" Description="Default Class for Holds" DescAlt=""
NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Diag" Description="Default Class for Process Diagnostics"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Red" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Red" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Sys" Description="Default Class for WorkstationST System
alarms" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Teal"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Teal" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="TEST" Description="Test Alarm Class" DescAlt=""
NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Maroon" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Maroon" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="OpSet" Description="Alarm Class for Operator Setpoint
Events" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Yellow"
AlarmForegroundColor="Black" AckBackgroundColor="Black"
AckForegroundColor="Yellow" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="SOE" Description="Default Class for Sequence of event"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Event" Description="Default Class for Process Events"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
</AlarmClasses></EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterHmiResources"><HmiResources>
<HmiResource Name="hgyugyg" />
</HmiResources></EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterPlantAreas"><PlantAreas>
<PlantAreaPath Path="Plant" />
<PlantAreaPath Path="Plant.PlantArea01" />
<PlantAreaPath Path="Plant.PlantArea01.PlantArea21" />
<PlantAreaPath Path="Plant.PlantArea02" />
<PlantAreaPath Path="Plant.PlantArea04" />
<PlantAreaPath Path="Plant.PlantArea14" />
<PlantAreaPath Path="Plant.PlantArea15" />
</PlantAreas></EGDConfigExtension>
</MasterEgdSymbolTable>
Oct 26 '06 #2
Hi Rick,

Thanks for providing me with the xml file and the code. According to your
description, I installed the two hotfixes on my machine and tried to
reproduce it on my machine. However, the code works fine and I didn't get
an infinate loop. I also set some breakpoints in the code and check for the
LineNumber and LinePosition properties. They are advancing properly.

Have you tried this code on another machine? If it is in an infinate loop,
did the thread hang?

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 27 '06 #3
Hi Kevin,

Yes, this is happening on several PCs. I could get you a dump from windbg
if you want.

If it makes a difference, I'm running the code from a Windows Form in the
constructor. Here is the VS2005 callstack:
System.Xml.dll!System.Xml.XmlTextReaderImpl.ParseQ Name(bool isQName =
true, int startOffset, out int colonPos = -1) + 0x10f bytes
System.Xml.dll!System.Xml.XmlTextReaderImpl.Increm entalRead() + 0x508 bytes
System.Xml.dll!System.Xml.XmlTextReaderImpl.Increm entalRead(System.Array
array, int index, int count) + 0x79 bytes
System.Xml.dll!System.Xml.XmlTextReaderImpl.ReadCh ars(char[] buffer, int
index, int count) + 0xbc bytes
System.Xml.dll!System.Xml.XmlTextReader.ReadChars( char[] buffer, int
index, int count) + 0x15 bytes
> ReadCharsSample.exe!ReadCharsSample.Form1.ReadElem entBodyAsXml(System.Xml.XmlTextReader reader = {Element, Name="EGDConfigExtension"}) Line 46 + 0x15 bytes C#
ReadCharsSample.exe!ReadCharsSample.Form1.ReadXml( ) Line 29 + 0x9 bytes C#
ReadCharsSample.exe!ReadCharsSample.Form1.Form1() Line 18 + 0x7 bytes C#
ReadCharsSample.exe!ReadCharsSample.Program.Main() Line 17 + 0x13 bytes C#
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.AppDomain.ExecuteAssembly(stri ng assemblyFile,
System.Security.Policy.Evidence assemblySecurity, string[] args) + 0x32 bytes

Microsoft.VisualStudio.HostingProcess.Utilities.dl l!Microsoft.VisualStudio.HostingProcess.HostProc.R unUsersAssembly() + 0x2b bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadS tart_Context(object
state) + 0x3b bytes

mscorlib.dll!System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext
executionContext, System.Threading.ContextCallback callback, object state) +
0x81 bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadS tart() + 0x40 bytes
The loaded modules are:

'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a 5c561934e089\mscorlib.dll',
No symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStud io.HostingProcess.Utilities\8.0.0.0__b03f5f7f11d50 a3a\Microsoft.VisualStudio.HostingProcess.Utilitie s.dll', Symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms \2.0.0.0__b77a5c561934e089\System.Windows.Forms.dl l', Symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a 5c561934e089\System.dll',
Symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0 .0__b03f5f7f11d50a3a\System.Drawing.dll', Symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStud io.HostingProcess.Utilities.Sync\8.0.0.0__b03f5f7f 11d50a3a\Microsoft.VisualStudio.HostingProcess.Uti lities.Sync.dll', Symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\ReadCharsXmlIssue\ReadCharsSample\bin\Debug\Re adCharsSample.vshost.exe',
Symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b 77a5c561934e089\System.Data.dll', Symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Deployment\2. 0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Symbols loaded.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__ b77a5c561934e089\System.Xml.dll', Symbols loaded.
The thread 0x60c has exited with code 0 (0x0).
The thread 0x1548 has exited with code 0 (0x0).
SRCSRV: The module
'C:\ReadCharsXmlIssue\ReadCharsSample\bin\Debug\Re adCharsSample.exe' does not
contain source server information.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\ReadCharsXmlIssue\ReadCharsSample\bin\Debug\Re adCharsSample.exe', Symbols
loaded.
SRCSRV: The module
'C:\ReadCharsXmlIssue\ReadCharsSample\bin\Debug\Re adCharsSample.exe' does not
contain source server information.
'ReadCharsSample.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration \2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dl l', Symbols loaded.
SRCSRV: The module
'C:\ReadCharsXmlIssue\ReadCharsSample\bin\Debug\Re adCharsSample.exe' does not
contain source server information.
SRCSRV: The module
'C:\ReadCharsXmlIssue\ReadCharsSample\bin\Debug\Re adCharsSample.exe' does not
contain source server information.
SRCSRV: The module
'C:\ReadCharsXmlIssue\ReadCharsSample\bin\Debug\Re adCharsSample.exe' does not
contain source server information.

--
Rick
"Kevin Yu [MSFT]" wrote:
Hi Rick,

Thanks for providing me with the xml file and the code. According to your
description, I installed the two hotfixes on my machine and tried to
reproduce it on my machine. However, the code works fine and I didn't get
an infinate loop. I also set some breakpoints in the code and check for the
LineNumber and LinePosition properties. They are advancing properly.

Have you tried this code on another machine? If it is in an infinate loop,
did the thread hang?

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 27 '06 #4
More information.... I tried just copying the text from my XML into a file
and as you reported... it reads correctly.

What I missed when pasting the XML in the post, we create our XML with UTF8
encoding, so the XmlTextWriter writes 3 bytes in the begining of the file.
If these 3 bytes are not present, ReadChars reads fine. If they are present,
I get the hang up.

The basic code we use to create an XML file is:
FileStream fileStream = new FileStream(@"NewFile.xml", FileMode.Create,
FileAccess.Write);
XmlTextWriter writer = new XmlTextWriter(fileStream, Encoding.UTF8);

....
write the xml
....
writer.Close();

The 3 bytes at the begining of the file are EF BB BF in value.
--
Rick
"Rick" wrote:
I forgot to mention, the infinate loop is in .Net Framework 2.0. I have the
hotfixes (KB924895 and KB922271) (as well as 2 security updates) installed.
--
Rick
"Rick" wrote:
The following code will enter an infinate loop when in ReadChars. I can only
make it happen when reading a Stream and with this particular XML. If I use
the ReadInnerXml call rather than my own ReadElementBodyAsXml the code works,
but is less efficent. ReadElementBodyAsXml is required by my application
with .Net Framework 1.1.

The code breaks on the second call to ReadElementBodyAsXml with the inner xml:
</EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterHmiResources"><HmiResources>
<HmiResource Name="hgyugyg" />
</HmiResources></EGDConfigExtension>
This is bad behavior, so I felt it should be posted. Maybe it is already
know to be fixed in SP1 (hopefully forthcoming).

Regards,
Rick

--- code that breaks ---
private void ReadXml()
{
FileStream fs = File.OpenRead(@"MasterSymbolTable.xml");
XmlTextReader reader = new XmlTextReader(fs, XmlNodeType.Element, null);
reader.MoveToContent();
reader.ReadToDescendant("EGDConfigExtension");
string xml = ReadElementBodyAsXml(reader);
reader.Read();
xml = ReadElementBodyAsXml(reader);
}

private string ReadElementBodyAsXml(XmlTextReader reader)
{
int startingLineNumber = reader.LineNumber;
int startingLinePosition = reader.LinePosition;
int startingDepth = reader.Depth;
bool startingElementIsEmpty = reader.IsEmptyElement;
string startingName = reader.Name;

System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element,
"Node type must be Element.",
"ReadElementBodyAsXml should be called when the reader is positioned on
an element. It will simply return null if it is not, but the intention is
for it to be used to read element content.");

char[] buffer = new char[512];
int totalRead = 0;
int i;
while ((i = reader.ReadChars(buffer, totalRead, buffer.Length -
totalRead)) 0)
{
totalRead += i;
if (reader.Depth <= startingDepth)
{
// Even though we read chars, the LineNumber and LinePosition do not
change
// unless we read a node. We don't want to read any more unless we are
// on a child node. But we also need to make sure that we are not still
// on the same node that we started with, since we could have some very
// big nodes. It is hard to tell if ReadChars returned because it did
// not have any more content buffered or if it got to the end of a node.
// If at the end of a node, which node?
// This code fixes SCR 2923.
if (reader.NodeType != XmlNodeType.Element)
break; // We must not be on the node we started on.
}
if (reader.NodeType == XmlNodeType.EndElement && reader.Depth ==
startingDepth)
break;
if (totalRead == buffer.Length)
{
char[] newBuf = new char[buffer.Length + 512];
Buffer.BlockCopy(buffer, 0, newBuf, 0, totalRead * 2); // Each char is
2 bytes.
buffer = newBuf;
}
}

string innerXml = null;
if (totalRead 0)
innerXml = new string(buffer, 0, totalRead);
else
innerXml = null;

return innerXml;
}

----- XML file MasterSymbolTable.Xml ---
<?xml version="1.0" encoding="utf-8"?>
<?GeCssClass type="GeIndsysNetworkCoe.EgdConfig.EgdMasterSymbol Table,
EgdCoeConfig"?>
<MasterEgdSymbolTable EGDSpecVersion="3.04" ConfigTimeSecs="1160762827"
ConfigTimeNSecs="704238500" xmlns="http://geindustrial.com/EGD" Name="Demo">
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterAlarms"><AlarmClasses>
<AlarmClass Name="Alarm" Description="Default Class for Process Alarms"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Red" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Red" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Trip" Description="Default Class for Convertor Trips"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Maroon" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Maroon" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="System" Description="Default Class for WorkstationST
System alarms" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Teal"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Teal" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="Diagnostic" Description="Default Class for Process
Diagnostics" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Red"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Red" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="Hold" Description="Default Class for Holds" DescAlt=""
NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Diag" Description="Default Class for Process Diagnostics"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Red" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Red" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Sys" Description="Default Class for WorkstationST System
alarms" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Teal"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Teal" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="TEST" Description="Test Alarm Class" DescAlt=""
NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Maroon" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Maroon" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="OpSet" Description="Alarm Class for Operator Setpoint
Events" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Yellow"
AlarmForegroundColor="Black" AckBackgroundColor="Black"
AckForegroundColor="Yellow" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="SOE" Description="Default Class for Sequence of event"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Event" Description="Default Class for Process Events"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
</AlarmClasses></EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterHmiResources"><HmiResources>
<HmiResource Name="hgyugyg" />
</HmiResources></EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterPlantAreas"><PlantAreas>
<PlantAreaPath Path="Plant" />
<PlantAreaPath Path="Plant.PlantArea01" />
<PlantAreaPath Path="Plant.PlantArea01.PlantArea21" />
<PlantAreaPath Path="Plant.PlantArea02" />
<PlantAreaPath Path="Plant.PlantArea04" />
<PlantAreaPath Path="Plant.PlantArea14" />
<PlantAreaPath Path="Plant.PlantArea15" />
</PlantAreas></EGDConfigExtension>
</MasterEgdSymbolTable>
Oct 27 '06 #5
Rick wrote:

The 3 bytes at the begining of the file are EF BB BF in value.
That is the BOM (byte order mark for UTF-8), you can avoid that by using
e.g.

XmlTextWriter writer = new XmlTextWriter(fileStream, new
UTF8Encoding(true));

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 27 '06 #6
Martin Honnen wrote:
Rick wrote:

>The 3 bytes at the begining of the file are EF BB BF in value.

That is the BOM (byte order mark for UTF-8), you can avoid that by using
e.g.

XmlTextWriter writer = new XmlTextWriter(fileStream, new
UTF8Encoding(true));
I misread the API, you need e.g.

XmlTextWriter writer = new XmlTextWriter(fileStream, new
UTF8Encoding(false));

to avoid the BOM.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 27 '06 #7
Should I avoid writing the BOM or is that required to tell a reader the
content is UTF8 encoded? My feeling is these bytes should be there. I want
unicode in my XML.

Also, if the BOM was writen by XMLTextWriter, should the XMLTextReader's
ReadChars exhibit the infinite loop behavior?
--
Rick
"Martin Honnen" wrote:
Martin Honnen wrote:
Rick wrote:

The 3 bytes at the begining of the file are EF BB BF in value.
That is the BOM (byte order mark for UTF-8), you can avoid that by using
e.g.

XmlTextWriter writer = new XmlTextWriter(fileStream, new
UTF8Encoding(true));

I misread the API, you need e.g.

XmlTextWriter writer = new XmlTextWriter(fileStream, new
UTF8Encoding(false));

to avoid the BOM.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 27 '06 #8
Rick wrote:
Should I avoid writing the BOM or is that required to tell a reader the
content is UTF8 encoded? My feeling is these bytes should be there. I want
unicode in my XML.
For UTF-8 the BOM is optional, see
<http://www.unicode.org/faq/utf_bom.html#BOM>
Also, if the BOM was writen by XMLTextWriter, should the XMLTextReader's
ReadChars exhibit the infinite loop behavior?
Usually Microsoft's XML parsers know how to deal with an UTF-8 BOM. I am
not sure why you get the loop problem but I have not read the complete
thread. I mainly tried to explain what the bytes you see are and to
provide a work around.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 27 '06 #9
Thanks for the post. Again, a workaround is for me to use ReadInnerXml
rather than building my own. The method using ReadChars was required in .Net
framework 1.1, but ReadInnerXml works for 2.0. The side effect is poorer
performance, so I'm interested if ReadChars could be fixed in a future .Net
framework release. I want to stick to writing the BOM for legacy reasons. I
have a lot of production code writing the BOM that I'll need to support
reading.
--
Rick
"Martin Honnen" wrote:
Rick wrote:
Should I avoid writing the BOM or is that required to tell a reader the
content is UTF8 encoded? My feeling is these bytes should be there. I want
unicode in my XML.

For UTF-8 the BOM is optional, see
<http://www.unicode.org/faq/utf_bom.html#BOM>
Also, if the BOM was writen by XMLTextWriter, should the XMLTextReader's
ReadChars exhibit the infinite loop behavior?

Usually Microsoft's XML parsers know how to deal with an UTF-8 BOM. I am
not sure why you get the loop problem but I have not read the complete
thread. I mainly tried to explain what the bytes you see are and to
provide a work around.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 27 '06 #10
Hi Rick,

Thanks for the information you have provided. I think this is the UTF8
problem. As you know, the 3 bytes should be there for a UTF8 encoded text
file.

In my opinion, you have to keep the UTF8 formatting when producing the xml
file. When reading it, tell the XmlTextReader that it is UTF8 encoded.
Because some UTF8 encoded file doesn't have BOM. So, let the XmlTextReader
handle it will be the best solution.

If you don't let it know about the UTF8 encoding, the code will surely fell
into some expected behavior.

If this does not help for you to resolved the problem, please feel free to
let me know.

Kevin Yu
Microsoft Online Community Support
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 30 '06 #11
Thank you Kevin,

Sorry but I'm still confused. When the 3 byte BOM is present and my code
constructs the XmlTextReader with the file stream pointing to the UTF8 BOM
file, after I execute the first reader.MoveToContent, I can see the
reader.Encoding property is set to UTF8. Then as it reads further, the
infinite loop occurs.

You said I should tell the reader to expect UTF8. How would I do that?

Thanks,
--
Rick
"Kevin Yu [MSFT]" wrote:
Hi Rick,

Thanks for the information you have provided. I think this is the UTF8
problem. As you know, the 3 bytes should be there for a UTF8 encoded text
file.

In my opinion, you have to keep the UTF8 formatting when producing the xml
file. When reading it, tell the XmlTextReader that it is UTF8 encoded.
Because some UTF8 encoded file doesn't have BOM. So, let the XmlTextReader
handle it will be the best solution.

If you don't let it know about the UTF8 encoding, the code will surely fell
into some expected behavior.

If this does not help for you to resolved the problem, please feel free to
let me know.

Kevin Yu
Microsoft Online Community Support
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 30 '06 #12
Hi Rick

What I mean to tell the reader to expect UTF8 is to specify UTF8 encoding
in the XmlTextReader constructor like Martin suggested.

XmlTextWriter writer = new XmlTextWriter(fileStream, new
UTF8Encoding(false));

Since you can see the Encoding property has been set to UTF8, it's fine. I
tried on my machine with a UTF8 xml with BOM, it is working fine. If you
still get an infinite loop on this machine, does it happen on another one?

If it still doesn't work for you, I think you have to use ReadInnerXml
instead. In my opinion, there will not be much difference in performance if
the Xml is not too big.

I'm sorry for didn't help much.

Kevin Yu
Microsoft Online Community Support
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 31 '06 #13
Hello Rick,

This looks like bug in the XmlTextReader. I don't think it is related to the
UTF-8 BOM. The BOM might be just affecting internal buffer alignment. Could
you please send me the XML file so I can take a look why it is looping and
file a bug?

Thank you,
-Helena Kotas [MSFT]

"Rick" wrote:
I forgot to mention, the infinate loop is in .Net Framework 2.0. I have the
hotfixes (KB924895 and KB922271) (as well as 2 security updates) installed.
--
Rick
"Rick" wrote:
The following code will enter an infinate loop when in ReadChars. I can only
make it happen when reading a Stream and with this particular XML. If I use
the ReadInnerXml call rather than my own ReadElementBodyAsXml the code works,
but is less efficent. ReadElementBodyAsXml is required by my application
with .Net Framework 1.1.

The code breaks on the second call to ReadElementBodyAsXml with the inner xml:
</EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterHmiResources"><HmiResources>
<HmiResource Name="hgyugyg" />
</HmiResources></EGDConfigExtension>
This is bad behavior, so I felt it should be posted. Maybe it is already
know to be fixed in SP1 (hopefully forthcoming).

Regards,
Rick

--- code that breaks ---
private void ReadXml()
{
FileStream fs = File.OpenRead(@"MasterSymbolTable.xml");
XmlTextReader reader = new XmlTextReader(fs, XmlNodeType.Element, null);
reader.MoveToContent();
reader.ReadToDescendant("EGDConfigExtension");
string xml = ReadElementBodyAsXml(reader);
reader.Read();
xml = ReadElementBodyAsXml(reader);
}

private string ReadElementBodyAsXml(XmlTextReader reader)
{
int startingLineNumber = reader.LineNumber;
int startingLinePosition = reader.LinePosition;
int startingDepth = reader.Depth;
bool startingElementIsEmpty = reader.IsEmptyElement;
string startingName = reader.Name;

System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element,
"Node type must be Element.",
"ReadElementBodyAsXml should be called when the reader is positioned on
an element. It will simply return null if it is not, but the intention is
for it to be used to read element content.");

char[] buffer = new char[512];
int totalRead = 0;
int i;
while ((i = reader.ReadChars(buffer, totalRead, buffer.Length -
totalRead)) 0)
{
totalRead += i;
if (reader.Depth <= startingDepth)
{
// Even though we read chars, the LineNumber and LinePosition do not
change
// unless we read a node. We don't want to read any more unless we are
// on a child node. But we also need to make sure that we are not still
// on the same node that we started with, since we could have some very
// big nodes. It is hard to tell if ReadChars returned because it did
// not have any more content buffered or if it got to the end of a node.
// If at the end of a node, which node?
// This code fixes SCR 2923.
if (reader.NodeType != XmlNodeType.Element)
break; // We must not be on the node we started on.
}
if (reader.NodeType == XmlNodeType.EndElement && reader.Depth ==
startingDepth)
break;
if (totalRead == buffer.Length)
{
char[] newBuf = new char[buffer.Length + 512];
Buffer.BlockCopy(buffer, 0, newBuf, 0, totalRead * 2); // Each char is
2 bytes.
buffer = newBuf;
}
}

string innerXml = null;
if (totalRead 0)
innerXml = new string(buffer, 0, totalRead);
else
innerXml = null;

return innerXml;
}

----- XML file MasterSymbolTable.Xml ---
<?xml version="1.0" encoding="utf-8"?>
<?GeCssClass type="GeIndsysNetworkCoe.EgdConfig.EgdMasterSymbol Table,
EgdCoeConfig"?>
<MasterEgdSymbolTable EGDSpecVersion="3.04" ConfigTimeSecs="1160762827"
ConfigTimeNSecs="704238500" xmlns="http://geindustrial.com/EGD" Name="Demo">
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterAlarms"><AlarmClasses>
<AlarmClass Name="Alarm" Description="Default Class for Process Alarms"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Red" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Red" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Trip" Description="Default Class for Convertor Trips"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Maroon" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Maroon" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="System" Description="Default Class for WorkstationST
System alarms" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Teal"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Teal" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="Diagnostic" Description="Default Class for Process
Diagnostics" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Red"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Red" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="Hold" Description="Default Class for Holds" DescAlt=""
NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Diag" Description="Default Class for Process Diagnostics"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Red" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Red" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Sys" Description="Default Class for WorkstationST System
alarms" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Teal"
AlarmForegroundColor="White" AckBackgroundColor="White"
AckForegroundColor="Teal" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="TEST" Description="Test Alarm Class" DescAlt=""
NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Maroon" AlarmForegroundColor="White"
AckBackgroundColor="White" AckForegroundColor="Maroon" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="OpSet" Description="Alarm Class for Operator Setpoint
Events" DescAlt="" NormalBackgroundColor="White"
NormalForegroundColor="Black" AlarmBackgroundColor="Yellow"
AlarmForegroundColor="Black" AckBackgroundColor="Black"
AckForegroundColor="Yellow" IsIntrinsic="true" NormalSeverity="350"
ActiveSeverity="500" />
<AlarmClass Name="SOE" Description="Default Class for Sequence of event"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
<AlarmClass Name="Event" Description="Default Class for Process Events"
DescAlt="" NormalBackgroundColor="White" NormalForegroundColor="Black"
AlarmBackgroundColor="Yellow" AlarmForegroundColor="Black"
AckBackgroundColor="Black" AckForegroundColor="Yellow" IsIntrinsic="true"
NormalSeverity="350" ActiveSeverity="500" />
</AlarmClasses></EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterHmiResources"><HmiResources>
<HmiResource Name="hgyugyg" />
</HmiResources></EGDConfigExtension>
<EGDConfigExtension Company="http://pdweb.salem.ge.com"
ExtensionCode="MasterPlantAreas"><PlantAreas>
<PlantAreaPath Path="Plant" />
<PlantAreaPath Path="Plant.PlantArea01" />
<PlantAreaPath Path="Plant.PlantArea01.PlantArea21" />
<PlantAreaPath Path="Plant.PlantArea02" />
<PlantAreaPath Path="Plant.PlantArea04" />
<PlantAreaPath Path="Plant.PlantArea14" />
<PlantAreaPath Path="Plant.PlantArea15" />
</PlantAreas></EGDConfigExtension>
</MasterEgdSymbolTable>
Nov 8 '06 #14

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

Similar topics

4
by: Meir S. | last post by:
I think the following is a bug in XmlTextReader: I need to process large XMLs, that are typically constructed of many small elements nested in the root element. Each inner element represents a...
3
by: keldan | last post by:
I am hoping someone on this list can shed some light on the below issue for me. I am using XmlTextReader to read from an XML file. Unfortunately, an exception is thrown ("Index was outside the...
4
by: Andy Neilson | last post by:
I've run across a strange behaviour with XmlSerializer that I'm unable to explain. I came across this while trying to use XmlSerializer to deserialize from a the details of a SoapException. This...
5
by: Geoff Bennett | last post by:
While parsing an XML document, my TextReader instance skips nodes. For example, in this fragment: <Person Sex="Male" FirstHomeBuyer="No" YearsInCurrentProfession="14"> <RelatedEntityRef...
1
by: Emsi | last post by:
Hello, how can I read values of child nodes with the XmlTextReader? File format: <root> <items> <item> <field1>value1</field1> <field2>value2</field2>
1
by: soupaman | last post by:
Im trying to output some filtered xml using the xmlTextReader I know the code and commenting needs cleaned up and eventually plan to add the values to a dataset. currently what this is doing is...
3
by: Newton | last post by:
Hi, I receive XML document from input and I would like to read it several times... My declaration is XmlTextReader XMLInputReader = new XmlTextReader(fileImport.PostedFile.InputStream); I...
0
by: Dave | last post by:
I'm reading chars from a file and displaying them in a label on a form. Following is a listing of the code section. Could anyone tell me the best way to do this? What I have works but wanted to...
4
by: Paul Bromley | last post by:
I thought that XMLTextReader would be simple to use, but I have run into problems with it! I seem to have great difficulty extrcting the text of specific elements from a very simple XML file. I...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.