Autodesk / Autodesk/PowerShapeAndPowerMillAPI

An unescaped ampersand in project path

Aperta
#59 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
52
Fork
49
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia da GetPowerMillParameterXML, in particolare dalla gestione della risposta immediatamente prima di XmlDocument.LoadXml. Riproduci il caso project_pathname(false) con la e commerciale nel percorso restituito, quindi verifica che l’XML risultante venga analizzato correttamente senza XmlException.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
api
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.