Autodesk / Autodesk/PowerShapeAndPowerMillAPI

An unescaped ampersand in project path

Abierto
#59 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
52
Forks
49
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

error inside:

public XmlDocument GetPowerMillParameterXML(string getParameterString)
{
var xmlResponse = new XmlDocument();
var response = _powerMILL.GetParameterXML(getParameterString);
if (string.IsNullOrWhiteSpace(response))
{
return null;
}
xmlResponse.LoadXml(response);
return xmlResponse;
}

getParameterString="project_pathname(false)"
print par $project_pathname(false) = X:/XXXXX/3723, TEST RIGS & MOCK-UPS/3723-5602,JIG,C CHANNEL

& - causes System.Xml.XmlException: An error occurred while parsing EntityName. Line 1, position 64.

================================================================

************** Exception Text **************
System.Xml.XmlException: An error occurred while parsing EntityName. Line 1, position 64.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseEntityName()
at System.Xml.XmlTextReaderImpl.ParseEntityReference()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at CallSite.Target(Closure , CallSite , XmlDocument , Object )
at Autodesk.ProductInterface.PowerMILL.PMAutomation.GetPowerMillParameterXML(String getParameterString)
at Autodesk.ProductInterface.PowerMILL.PMProject.get_Directory()
at PowerMill_Tools.Form1.btnReloadLists_Click(Object sender, EventArgs e) in \\xxxx\Form1.vb:line 1278

================================================================

PS C:\Users\Artur.Boszczyk> [System.Reflection.Assembly]::GetAssembly([System.Xml.XmlDocument]).GetName().Version
Major Minor Build Revision
----- ----- ----- --------
4 0 0 0

================================================================

Autodesk PowerMill Ultimate 2025
Version: 2025.0.1.2025012
Windows 11 25H2

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Empieza en GetPowerMillParameterXML, especialmente en el manejo de la respuesta inmediatamente anterior a XmlDocument.LoadXml. Reproduce el caso de project_pathname(false) con el ampersand en la ruta devuelta y verifica después que el XML resultante se analiza correctamente sin XmlException.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp
Área
api
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.