Skip to content

Commit

Permalink
Cherry pick branch 'genexuslabs:xml-open-from-string' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiamurialdo authored and genexusbot committed Aug 7, 2023
1 parent 6c2c20a commit a28074a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
9 changes: 0 additions & 9 deletions dotnet/src/dotnetcore/GxClasses/Domain/GXXmlReadWrite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public interface IGxXmlFunctions
}
public class GXXMLReader : IDisposable
{
private static readonly ILog log = log4net.LogManager.GetLogger(typeof(GeneXus.Configuration.Config));
public const short ElementType = 1;
public const short EndTagType = 2;
public const short TextType = 4;
Expand Down Expand Up @@ -277,14 +276,6 @@ public void OpenFromString(string s)
Uri baseUri = new Uri( sBaseDirectory );
Resolver.Myself = baseUri;
CreateXMLSettings();
try
{
if (File.Exists(s))
XMLInput = new FileStream(s, FileMode.Open, FileAccess.Read);
}
catch(Exception ex) {
GXLogging.Warn(log, "OpenFromString file failed", ex);
}
if (XMLInput ==null)
XMLInput = new StringReader(s);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,7 @@ public void OpenFromString(string s)
Resolver.Myself = baseUri;
treader = null;
mreader = null;
try
{
if (File.Exists(s))
treader = new XmlTextReader(s);
}
catch { }
if (treader==null)
treader = new XmlTextReader(new StringReader(s));
treader = new XmlTextReader(new StringReader(s));
SetDtdProcessing(treader, Resolver, validationType);
vreader = new XmlValidatingReader( treader );
vreader.XmlResolver = Resolver;
Expand Down

0 comments on commit a28074a

Please sign in to comment.